[thelist] Why do we say what we say?

cj distro.lists at gmail.com
Thu Oct 25 08:28:13 CDT 2007

On 10/25/07, Rick den Haan <rick.denhaan at gmail.com> wrote:
> Something else that the validator will happily ignore is code indentation.
> Personally, I use tabs, but some people like to use spaces, in various
> amounts (2, 3, 4 or sometimes even 6 spaces per indentation). Other
> developers tend to close their elements after the indentation, e.g.:
> <ul
>    ><li>Item 1</li
>    ><li>Item 2</li
> ></ul>
> I never saw the point in that, but I'm told it could get rid of some
> unwanted space in some browsers. And the validator -and browsers- happily
> accept this. What's your preference for indentation?

(this is going to be a bit short on details since it's been quite a
while since i ran into this.)

the "unwanted space in some browsers" is definitely a real issue for
ie6 (not sure about ie7) with lists.  ie6 will see the carriage return
after a <li>item</li> line as being a space and put
margin/padding/whatever between your list items unless you do
something similar to what you posted.  i've had it happen to me during
development, and i wish i had a sample laying around i could show you.
 iirc i solved this through some ie-only css, but the above method
takes care of it as well.

More information about the thelist mailing list