Beste collage webdev-ers 
Ik zit met het volgende probleem.
Ik heb een verticaal menu. En sommige menu items hebben een submenu.
Een menu item kan de class 'active' hebben als het actief is.
Het probleem is als volgt:
Als een actief item onder een item met een submenu staat, dan opent het submenu achter het actieve item. Maar enkel in IE (6 en 7)

m'n code:
en de css
iemand enig idee waarom dit fout gaat?
Zowel met strict/loose en transitional geprobeerd.
[code] kan een taal bevatten voor highlighting
Ik zit met het volgende probleem.
Ik heb een verticaal menu. En sommige menu items hebben een submenu.
Een menu item kan de class 'active' hebben als het actief is.
Het probleem is als volgt:
Als een actief item onder een item met een submenu staat, dan opent het submenu achter het actieve item. Maar enkel in IE (6 en 7)

m'n code:
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
| <div class="verticalMenu"> <div class="verticalMenuBot"> <ul> <li><a href="#">Home</a></li> <li onmouseover="showSubMenu(this)" onmouseout="hideSubMenu(this)"><a href="#">Pagina 1</a> <div style="display: none; z-index: 0;"> <ul> <li><a href="#">Nieuws</a></li> <li><a href="#">Archief</a></li> </ul> <span class="last"></span></div> </li> <li onmouseover="showSubMenu(this)" onmouseout="hideSubMenu(this)"><a href="#">Pagina 2</a> <div style="display: none; z-index: 0;"> <ul> <li><a href="#">Sub 1</a></li> <li><a href="#">Sub 2</a></li> </ul> <span class="last"></span></div> </li> <li><a href="#" class="active">Prikbord</a></li> </ul> </div> </div> |
en de 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| .verticalMenu { width:226px; position:absolute; left:212px; top:-175px; background:url(../img/menuBg.jpg) no-repeat left top; text-align:center; padding-top:15px; } .verticalMenuBot { width:226px; background:url(../img/menuBg.jpg) no-repeat left bottom; padding:20px 0px 90px 0px; } .verticalMenuBot ul { list-style:none; display:block; } .verticalMenuBot ul li { width:226px; display:block; text-align:right; height:27px; position:relative; } .verticalMenuBot ul li a { font:normal 15px/25px Arial, Helvetica, sans-serif; color:#424242; padding-right:72px; width:153px; display:block; height:27px; background:url(../img/singleDot.jpg) no-repeat 184px 7px; } .verticalMenuBot ul li a:active, .verticalMenuBot ul li a.active { background:#a6bc1e; z-index: 0; } .verticalMenuBot ul li a:hover, .verticalMenuBot ul li a.hover{ background:#e2eb57 url(../img/singleDot.jpg) no-repeat 184px 7px; z-index: 0; } .verticalMenuBot ul li div { position:absolute; left:210px; top:0px; display:none; border:1px solid red; } .verticalMenuBot ul li ul { background:url(../img/menuBg.png) no-repeat left top; width:241px; } .verticalMenuBot ul li ul li { width:241px; margin:0px; padding:0px; text-align:left; } .verticalMenuBot ul li ul li a { width:222px; text-align:left; margin:0px; padding:0px 0px 0px 15px; background:url(../img/singleDot.jpg) no-repeat 205px 7px; } .verticalMenuBot ul li ul li a:hover, .verticalMenuBot ul li ul li a.hover{ background: #e2eb57 url(../img/singleDot.jpg) no-repeat 205px 7px; } .last { background:url(../img/menuBotBg.png) no-repeat left top; width:241px; height:9px; clear:both; display:block; } .verticalMenuBot ul li div ul li div { display:none; left:223px; } |
iemand enig idee waarom dit fout gaat?
Zowel met strict/loose en transitional geprobeerd.
[code] kan een taal bevatten voor highlighting
[ Voor 1% gewijzigd door BtM909 op 26-03-2009 11:29 ]