I have a navigation bar at the top of a page. In FF and Chrome the navigation bar displays fine. However in IE8 (with or without compatibility) the UL seems to indent from the left hand side, not each li just the whole li; despite declaring
text-align:center; width:600px; margin:auto; padding-left:0;
Any ideas what could be causing this?
Using
list-style-position:outside;
specifically for IE6/IE7 worked for me. However, note that this may only be necessary if you're usinglist-style-position:inside;
for other browsers and simply hiding the default list margin/padding by setting them to 0. Working with IE requires some finesse, and a lot of browser-specific CSS.I just used ul { list-style-position:outside; } to fix the indent in IE.
In Firefox the UL is padded left by default, in IE it has a left margin.
Example:
I think it should be: