[thelist] CSS lists line height

rudy r937 at interlog.com
Thu Aug 22 18:35:01 CDT 2002


>    Not so fast.

cheese it, the css cops are here   ;o)

> Applying a margin to a list item element (<li>) is not "sloppy", IMO,
> nor is it semantically wrong. It's a perfectly good use of CSS

totally agree

> ... that rudy happens to personally dislike
> (simply as a matter of taste, as far as I can tell).

oh, i like it well enough, i don't dislike it at all

there are just a couple of "yeah, but" conditions that accompany it

applying a style to LI means it takes effect on all LIs

my way, you can easily distinguish spaced out lists versus "compact" lists
(since there's no "compact" attribute on the UL tag any more)

sure, you can start differentiating *which* LIs get the extra spacing, but
that's a slippery slope, and before you know it, you have UL>LI or UL LI or
whatever, or classes on the ULs and spans inside the <li>...</li>, to say
nothing of spurious <br /> tags sometimes, for no apparent reason... or
(gulp) divs...

then along comes yet another list where you want regular spacing in between
list items, but since it's already been tweaked, now instead of another
list class, or maybe in addition to, or was it an ID, you start monkeying
with negative margins, hoping that some of them will be additive, depending
on the cascade order, and whoa, what about the padding, i could use that
instead...

that way lies madness

your style sheet becomes an incredible house of cards, to fall apart at the
slightest tweak... don't laugh, i've seen it happen -- well, maybe only to
me

but it seems a lot of the questions on css-discuss are just like that,
people painting themselves into corners

as i said, i like css, but i figure the simper the better

also, i agree with the aardvark, it may be better to unlistify them if
they're more than a paragraph

;o)





More information about the thelist mailing list