[thelist] CSS lists line height

rudy r937 at interlog.com
Thu Aug 22 12:55:01 CDT 2002


hi erika

some may tell you to apply margin or padding to LI , or maybe UL, or UL LI,
or Ul, LI, or perhaps even UL > LI

don't do it

list items can contain block items, so just use <p>...</p> inside
<li>...</li>

the only time you want them spaced out is when the list items contain so
much text that the entire list looks like one huge monolithic block, so you
want something resembling paragraph spacing...

... which you get after realizing that the large block of text inside each
list item is actually a paragraph and coding it as such...

this also leaves the door open for other lists, containing list items of
just one or two words, say, to be entered as plain (i.e. P-less) words, in
which case the default single spacing for list items is just fine, thanks

notice no style sheet has been harmed in the making of this solution

i have nothing against style sheets, in fact i heart style sheets

however, a solution that is even simpler than messing with style sheets has
unresistable appeal for me

who hasn't been bitten by a style issue that turns out to have been caused
by something you did yourself in trying to fix some previous style issue?

maybe only i do that


rudy




More information about the thelist mailing list