Keep in mind that if you want to use the :hover
class in anything other than an anchor tag, forget getting it to work in IE6 and make sure you have the correct DOCTYPE
for the other browsers.
Try replacing the relevant parts of your CSS with this:
li
{
display: inline;
}
ul.level_1 li
{
position: relative;
}
ul.level_1 ul
{
position: absolute;
visibility: hidden;
}
li:hover ul
{
position: absolute;
right: 0;
visibility: visible;
width: 300px;
}
Basically hides the sub-level list until you hover over the parent list item node.
Setting the parent list item nodes as position:relative
means that if you set any child nodes within as position:absolute
it will be set relative not to the browser window but to the parent list item. This will have them show up directly underneath the list item you're hovering over and not on the other side of the window.
The width was added to have the sub-level list display as a line instead of a column.