Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nav bar working in IE & Opera, not in Mozilla

Status
Not open for further replies.

multichild

Programmer
Jan 28, 2006
76
GB
I am building this site:


here is the css:

#navcontainer ul
{
Z-INDEX: 9;
padding: .2em 0;
margin-left:307px;
margin-bottom:1px;
margin-top:0px;
list-style-type: none;
background-color: #036;
color: #FFF;
width: 59%;
font: normal 140% arial, helvetica, sans-serif;
text-align: left;
}

As the title says, works in other but not in mozilla...

Its something to do with the font size and padding left by the seams, but dotn seem to be able to get it right for all of them.

Lee
 
Take some time out to validate your CSS using this tool:


You'll find the error immediately. You have erroneous code in your CSS file - namely HTML style comments:

Code:
<!-- Navigation bar -->

Remove any of these, and use C-style multi-line comments:

Code:
/* Navigation bar */

Firefox is ignoring the rule following the error, you see.

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thanks Dan,

That did the trick, but the style difference of IE compared to Opera and Mozilla is the next problem.

Thanks

Lee
 
Opera and FF show the same result for me, so it is IE that seems to be at fault here. Is it the IE result you're looking for?
 
Umm ye your right, Opera and FF are the same, and IE is different, but I would prefer them all to be like IE.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top