I'm using CSS for creating a dropdown menu, but I don't know what's going wrong with it. It's not dropping the sub-menu (un-ordered list in my code) when hover is fired. I'm badly stuck here, please help me out.
I also tried the visibility property instead of display. I could see only
menu1, menu2, menu3 in browser horizontally and nothing else.
I'm using IE7 on XP SP3.
CSS:
#navMenu ul{
argin:0;
padding:0;
}
#navMenu li {
margin:px;
padding:0;
position:relative;
float:left;
display:block;
list-style:none;
}
#navMenu li a{
text-align:center;
text-decoration:none;
width:100;
display:block;
}
#navMenu ul ul{
display:none;
}
#navMenu ul li : hover ul {
width:auto;
position:absolute;
background:#453DD;
display:block;
}
HTML:
<div id="wrapper" >
<div id="navMenu">
<ul>
<li><a href="#">menu1</a>
<ul>
<li><a href="#">menuitem11</a></li>
<li><a href="#">menuitem12</a></li>
<li><a href="#">menuitem13</a></li>
<li><a href="#">menuitem14</a></li>
</ul>
</li>
<li><a href="#">menu2</a>
<ul>
<li><a href="#">menuitem11</a></li>
<li><a href="#">menuitem12</a></li>
<li><a href="#">menuitem13</a></li>
<li><a href="#">menuitem14</a></li>
</ul>
</li>
<li><a href="#">menu3</a>
<ul>
<li><a href="#">menuitem11</a></li>
<li><a href="#">menuitem12</a></li>
<li><a href="#">menuitem13</a></li>
<li><a href="#">menuitem14</a></li>
</ul>
</ul>
</div>
</div>