I'm using the following css for my horizontal navigation menu. I started out with this tutorial: and I guess somewhere along the way I goofed something up. Everything looks fine in IE, but in FF all of the links are jumlbled on top of each other. I'm sure it's just a small setting somewhere, but for the life of me I can't find it! Can anyone take a look at this and help me figure out why FF won't display the links in a horizontal line?
I have the menu set in an unorderd list, like so:
Hope This Helps!
ECAR
ECAR Technologies
"My work is a game, a very serious game." - M.C. Escher
Code:
#nav, #nav ul {
/* all lists */
padding: 0;
margin: 0;
list-style: none;
line-height: 1;
}
#nav a {
text-decoration: none;
color: Black;
border: 1px solid gray;
display: block;
width: 10em;
height: 18px;
padding-top: 2px;
}
#nav a:Hover {
color : white;
background-color: #6386B5;
border: 1px solid Black;
text-decoration: none;
}
#nav li { /* all list items */
float: left;
width: 0em; /* width needed or else Opera goes nuts */
}
#nav li ul {
/* second-level lists */
position: absolute;
text-align: left;
background-color: #D6D3BD;
border: 1px solid black;
border-top: 1px solid white;
left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
}
#nav li ul a {
text-decoration: none;
color: Black;
width: 13em;
border: 1px solid #D6D3BD;
border-top: 1px solid black;
}
#nav li ul a:hover {
color : white;
background-color: #6386B5;
border: 1px solid #6386B5 ;
border-top: 1px solid black;
text-decoration: none;
}
#nav li ul ul {
/* third-and-above-level lists */
margin: -1.5em 0 0 13em;
}
#nav li ul ul a {
/* third-and-above-level lists */
width: 15em;
}
#nav li:hover ul ul, #nav li.sfhover ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul { /* lists nested under hovered list items */
left: auto;
}
Code:
<ul id="nav">
<li><a href="">Home</a></li>
<li style="width: 12px;">-</li>
<li><a href="">Ad Categories</a>
<ul>
<li><a href=""> Announcements</a>
<ul>
<li><a href=""> Garage Sales</a></li>
<li><a href=""> General Announcements</a></li>
<li><a href=""> Lost and Found</a></li>
</ul>
</li>
<li><a href=""> Automotive</a>
<ul>
<li><a href=""> ATVs</a></li>
<li><a href=""> Automotive Accessories</a></li>
<li><a href=""> Classic Cars</a></li>
<li><a href=""> Commercial Vehicles</a></li>
<li><a href=""> Marine</a></li>
<li><a href=""> Mini Vans/Vans</a></li>
<li><a href=""> Motorcycles</a></li>
<li><a href=""> Passenger Cars</a></li>
<li><a href=""> Pickup Trucks</a></li>
<li><a href=""> Recreational Vehicles</a></li>
<li><a href=""> Sports Cars</a></li>
<li><a href=""> SUVs</a></li>
</ul>
</li>
<li><a href=""> Tickets & Events</a>
<ul>
<li><a href=""> Concert Tickets</a></li>
<li><a href=""> Other Events</a></li>
<li><a href=""> Plays & Musicals</a></li>
<li><a href=""> Sporting Event Tickets</a></li>
</ul>
</li>
</ul>
</li>
<li style="width: 12px;">-</li>
<li><a href="">Place an Ad</a></li>
<li style="width: 12px;">-</li>
<li><a href="">My Account</a></li>
<li style="width: 12px;">-</li>
<li><a href="">Contact Us</a></li>
</ul>
Hope This Helps!
ECAR
ECAR Technologies
"My work is a game, a very serious game." - M.C. Escher