I've created a navigation menu with a drop down sub menu. It all worked perfectly but for some reason, it no longer works in Internet Explorer. I'm using version 8 which is supposed to support the pseudo-classes I need to use.
It still works in Firefox, Safari, Google Chrome and Opera.
I have tried replacing the code with the code I used for other menus and it still doesn't work.
Can anyone help me because it really is a mystery?
I've taken out any colours or font styles to keep the code as simple as possible.
Any help would be greatly appreciated.
I'd rather just have to change the CSS. I don't really want to change the HTML if I can avoid it.
It still works in Firefox, Safari, Google Chrome and Opera.
I have tried replacing the code with the code I used for other menus and it still doesn't work.
Can anyone help me because it really is a mystery?
Code:
<div id="menu">
<div class="mainmenu">
<ul>
<li>
<a href='[I]path[/I]'>Home</a>
</li>
<li>
<a href='[I]path[/I]'>Country Garden</a>
</li>
<li>
<a href='[I]path[/I]'>Inner City Garden</a>
</li>
<li>
<a href='[I]path[/I]'>Winter Garden</a>
<ul>
<li>
<a href='[I]path[/I]'>Featured Products</a>
</li>
<li>
<a href='[I]path[/I]'>Best Sellers</a>
</li>
<li>
<a href='[I]path[/I]'>Special Offers</a>
</li>
</ul>
</li>
<li>
<a href='[I]path[/I]'>Water Garden</a>
</li>
<li>
<a href='[I]path[/I]'>Window Box</a>
</li>
</ul>
</div>
</div>
Code:
.mainmenu{
clear: both;
height: 42px;
margin: 0;
width: 980px;
}
.mainmenu ul{
list-style: none;
margin: 0;
padding: 0;
text-align:center;
}
.mainmenu li{
display: inline-block;
margin: 0;
padding: 0;
z-index:1000;
height: 42px;
position: relative;
}
.mainmenu li a{
display: inline-block;
height: 33px;
padding: 9px 25px 0;
}
.mainmenu ul ul{
float: left;
left: 0;
padding: 5px 0 10px 0;
position: absolute;
text-align: left;
top: 42px;
width: 200px;
z-index: 10000;
}
.mainmenu li li{
clear: both;
text-align: left;
height: 30px;
}
.mainmenu ul li ul{
display:none;
}
.mainmenu li ul li a {
height: auto;
padding: 2px 25px;
width: 150px;
}
.mainmenu li ul li a, .mainmenu li.over li a {
text-decoration: none !important;
}
.mainmenu li:hover ul, .mainmenu li.over ul {
display: block;
}
Any help would be greatly appreciated.
I'd rather just have to change the CSS. I don't really want to change the HTML if I can avoid it.
Comment