Ik heb een UL LI menu met custom images, de plus en min uit Windows explorer. Zo kan ik met wat redelijk simpele CSS hacks en JavaScript een mappen boomstructuur simuleren in een webpagina. Werkt onder FireFox etc., onder Internet Explorer 7 (forget about 6) heb ik nog wat bugs, waaronder deze:
Alle plussen en minnen staan verticaal in het midden van de LI waar deze bij hoort, terwijl een list item normaal bovenaan staat. Ook als ik deze code zo los bekijk zie ik de list item bovenaan staan in IE7. Bekijk ik hem met CSS, en verander ik in die IE developer toolbar de image in none en de style in disc, dan staat de disc ONDERAAN de LI, om het feest compleet te maken
De background-truc werkt natuurlijk niet omdat het echt een (werkende) knop is.
En de relevante CSS:
Alle plussen en minnen staan verticaal in het midden van de LI waar deze bij hoort, terwijl een list item normaal bovenaan staat. Ook als ik deze code zo los bekijk zie ik de list item bovenaan staan in IE7. Bekijk ik hem met CSS, en verander ik in die IE developer toolbar de image in none en de style in disc, dan staat de disc ONDERAAN de LI, om het feest compleet te maken
De background-truc werkt natuurlijk niet omdat het echt een (werkende) knop is.
HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
| <ul id="projects"> <li style="" class="parent"> <span style= "border: thin outset rgb(187, 238, 51); background-color: rgb(187, 238, 51);"> Jansen B.V.</span> <ul> <li style="" class="parent"> <span style= "border: thin outset rgb(187, 238, 51); background-color: rgb(187, 238, 51);"> Nieuwe website</span> <ul> <li style=""> <span style= "border: thin outset rgb(187, 238, 51); background-color: rgb(187, 238, 51);"> Support strippenkaart</span> </li> <li style=""> <span style= "border: thin outset rgb(187, 238, 51); background-color: rgb(187, 238, 51);"> Sales</span> </li> <li style="" class="parent"> <span style= "border: thin outset rgb(187, 238, 51); background-color: rgb(187, 238, 51);"> SEO update</span> <ul> <li style=""> <span style= "border: thin outset rgb(187, 238, 51); background-color: rgb(187, 238, 51);"> Test JS</span> </li> </ul> </li> </ul> </li> </ul> </li> <li style="" class="parent"> <span style= "border: thin outset rgb(85, 68, 238); background-color: rgb(85, 68, 238);"> Gropide</span> <ul> <li style="" class="parent"> <span style= "border: thin outset rgb(85, 68, 238); background-color: rgb(85, 68, 238);"> Intranet</span> <ul> <li style=""> <span style= "border: thin outset rgb(85, 68, 238); background-color: rgb(85, 68, 238);"> Presales traject</span> </li> <li style=""> <span style= "border: thin outset rgb(85, 68, 238); background-color: rgb(85, 68, 238);"> Ontwikkeling</span> </li> </ul> </li> </ul> </li> <li style="" class="parent"> <span style= "border: thin outset rgb(34, 238, 68); background-color: rgb(34, 238, 68);"> Berendsen Mapnavigatiesystemen B.V.</span> <ul> <li style=""> <span style= "border: thin outset rgb(34, 238, 68); background-color: rgb(34, 238, 68);"> Groente en fruit</span> </li> </ul> </li> </ul> |
En de relevante CSS:
Cascading Stylesheet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| #projects { margin: 0px; padding-left:20px; width: 220px; float: left; } #projects ul { margin: 0px; padding-left:20px; } #projects li { margin-left: 0px; list-style: none; list-style-image: none; list-style-type: none; cursor: crosshair; width: 140px; /*font-size: 12px;*/ } #projects li.parent { cursor: pointer; list-style-image: url('../images/close.png'); } #projects li span { cursor: move; /*background-color:#99AADD;*/ width: 140px; display: block; /*border: thin outset #99AADD;*/ text-align: left; padding: 3px; } #projects li ul { cursor: auto; } #projects li.parent > span { /*background-color:#99AACC; border: thin outset #99AACC;*/ cursor: default; } #projects li.closed { list-style-image: url('../images/open.png'); } #projects li.closed ul { display: none; } |
[ Voor 1% gewijzigd door BikkelZ op 06-10-2008 11:25 . Reden: background truc ]
iOS developer