|
Posted by dorayme on 06/19/06 07:44
In article <Bmslg.6054$w77.2200@reader1.news.jippii.net>,
"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote:
> Els <els.aNOSPAM@tiscali.nl> scripsit:
>
> > Not sure if this is what you are looking for, but if you write the
> > list without space or newline between the list items, like so:
> > <ul><li>Item1</li><li>Item2</li><li>Item3</li></ul>, the visual space
> > between the items will also disappear.
>
> This is known as white space bug in browsers: if you have a line break
> between, say, </li> and <li>, they incorrectly treat the line break as
> equivalent to a space. By HTML (SGML) rules, a line break shall be ignored
> in such a context. Worse still, browsers treat the space they construct as
> appearing inside the li element, as if you had
> <ul><li>Item1 </li><li>Item2 </li><li>Item3 </li></ul>
> (This is all wrong, since whitespace between elements should be ignored.)
>
> There's probably little hope of having the bug ever fixed in popular
> browsers, so it is best to use the suggested compact notation in problematic
> cases.
>
> > Then, with margin-left/right, you can set the exact space you like.
>
> With the usual CSS caveats, yes.
Right, seems I must have read something in HTML and CSS specs
once and just swallowed it whole.
I have indeed now set the space exactly as I like it and am well
pleased, a little problem I have been vaguely messing about with
for ages...
The only little drawback, easily lived with, is this: it does
not look so tidy in the html now (my actual list is much longer
and more complex with title and links).
I rather liked the orderliness of the line breaks before in the
HTML. But the price is small considering the sheer beauty of the
final result. (at least my editor wraps my lines to view them). I
now have a satisfyingly exact spacing between my border
separators and the text list items that maintain the ratios over
different font sizes as set by users...
--
dorayme
[Back to original message]
|