Forum Moderators: not2easy

Message Too Old, No Replies

OL - Howo to remove the indent space

Ok in Mozilla but not in IE

         

tomda

10:57 am on Sep 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Reference : [webmasterworld.com...]

I would like to remove the indent space before the <OL>
*************
Text
1. TextOL

AND NOT

Text
1. TextOL
*************

I manage to do it by putting a negative value in the margin-left.

OL {list-style:square; list-style-position:inside; color:#CCCCCC; font-size:13px; font-family:arial; margin:0px; margin-left:-40px;}

It works great with Mozilla but not in IE.

Why can I do?

Thanks

jetboy_70

11:51 am on Sep 17, 2004 (gmt 0)

10+ Year Member



To get cross-browser list indentation you have to set both the left margin and the left padding to the same value. Eric Meyer covers this in detail here:

[devedge.netscape.com ]

Even here, different browsers choose different positions for the bullets, so the overall look is not going to be 100% cross-browser. Try using list-style: none and putting in the bullet as a background image on each <li> element. This seems to be a more solid approach.