I'm using some CSS-powered dropdown menus (Suckerfish-style). They work fine in Opera and IE, but (unsurprisingly) not in Firefox.
The menus are sent as a standard bulleted list.
The problem is that to get the root of the menu to appear all on one line, I'm using this:
#nav li {
float: left;
}
IE and Opera only apply the style to the root. However, Firefox appears to apply this to everything - so my dropdowns are horizontal on everything. If I remove the float:left line, the menus are correct(-ish), bar the fact that the root is now split onto multiple lines, rather than all on one. My stylesheet is:
#nav, #nav ul {
padding: 0px;
margin: 0px;
list-style: none;
line-height: 1;
font-size: 12px;
}
#nav li {
float: left;
}
#nav a {
display: block;
color: white;
font-weight: bold;
font-family: arial, helvetica, serif;
padding: 2px;
}
#nav a:hover {
color: #F28108;
padding: 2px;
}
#nav ul li a:hover {
background: #0A77D4;
}
#nav li ul {
position: absolute;
background: #5EC0F8;
visibility: hidden;
border-width: 1px;
border-style: solid;
border-color: white;
padding: 0px;
margin: 0px;
list-style: none;
}
#nav li ul li:hover {
background: #0A77D4;
color: #F28108;
}
#nav li ul li {
border-bottom-width: 1px;
border-bottom-style: solid;
border-color: white;
}
#nav li ul ul {
margin: -0.5em 0 0 11em;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
visibility: hidden;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */
visibility: visible;
}