firstly this should be done using a unordered list because thats what this is.
you will find it much easier that way to do your submenus...
as for the new css messing up your existing code, well all you need to do for that is to create a unique id for the menu and reference it in your css stylesheet
Code:
<ul id="menu">
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a>
<ul class="sub-menu">
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a></li>
</ul>
</li>
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a>
<ul class="sub-menu">
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a></li>
<li><a href="/path">TITLE</a></li>
</ul>
</li>
</ul>
Code:
ul#menu li {
list-style: none;
display:block;
}
ul#menu li ul.submenu {
display: none;
}
ul#menu li:hover ul.submenu {
display:block;
position: relative;
top: 1em; /* distance from the top of the link selected */
left: 5em; /* distance left from the left margin of the link selected
z-index: 5; /* to ensure this is the element is in the foreground */
}
note this will not work for older "legacy" browsers that do not have support for the psuedo selector :hover most notably IE6. See http://www.alistapart.com/articles/hybrid/ for more information
Bookmarks