Forum Moderators: not2easy

Message Too Old, No Replies

how do you control <ul> indent?

         

bungle

5:38 pm on Nov 17, 2003 (gmt 0)

10+ Year Member



Hello, we're going to be listing links using the <ul><li> tags, however the default indentation is a bit much for our design - how can we decrease indent with css?

drbrain

6:30 pm on Nov 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The easiest way is to adjust the left margin of the list-item:

li { margin-left: -1em }

defanjos

6:35 pm on Nov 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try this also [webmasterworld.com]

bungle

12:52 am on Nov 18, 2003 (gmt 0)

10+ Year Member



so a negtive (-) value is OK to use in css?

Thanks!

D_Blackwell

4:26 am on Nov 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



defanjos link is a good one. Lists tend to come with default margin and/or padding. I usually get a handle on it by setting both to 0, and then positioning with my own margin or padding.

drbrain

7:07 pm on Nov 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Negative values are allowed in most places, but not in others.

padding and borders, for example, do not allow negative values.