I need help with creating a horizontal menu that has 2 sublevels. I want to keep the top-level menu in hover state when moving down. Here is the HTML and CSS code:
For the HTML Code:
<div>
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a href="#">Products</a>
<ul class="child">
<li><a href="#">Hard Drives</a></li>
<li><a href="#">Monitors</a></li>
<li><a href="#">Speakers</a>
<ul class="child">
<li><a href="#">10 watt</a></li>
<li><a href="#">20 watt</a></li>
<li><a href="#">30 watt</a></li>
</ul>
</li>
<li><a href="#">Random Equipment</a></li>
</ul>
</li>
<li><a href="#">Services</a>
<ul class="child">
<li><a href="#">Repairs</a></li>
<li><a href="#">Installations</a></li>
<li><a href="#">Setups</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
And for the CSS Code:
> body {
}
#nav li {
list-style:none;
float: left;
}
#nav li a {
display: block;
padding: 8px 12px;
text-decoration: none;
}
/* Additional CSS code goes here */
If anybody could provide guidance on how to achieve this, it would be much appreciated. Thank you.