Removing white space before <li> items

Normal lists indent before the bullet, a la

[list]
[]item 1
[
]item 2
[/list] Is there some way to reduce or eliminate the white space? I can’t find any properties that might do the job.

Cheers G :-)>

css:


ul, li {
margin: 0;
padding: 0;
}

That removes all white-space. Play around with the numbers (5px, 10px, I don’t know) to suit.

Ah, cool, thanks. I tried changing the margins but didn’t think of the padding!

Cheers G :-)>

Yeah, browsers also have inconsistent defaults for these things. For example, Opera uses padding on the <body> by default, when most browsers use margin.

What I do, is place this at the top of my stylesheet, then add margin, padding and other attributes as needed:


* {
margin: 0;
padding: 0;
border: none;
list-style-type: none;
}