
Cheryl,
interesting, thanks! I think the :first-letter will come in
handy at times. I hadn't been aware of it.
Doesn't solve the hanging indent problem though, except in the
special case where the tags consist of exactly one character,
which is rare. In that case the following would work:
.hanging-indent { margin-left: 1.5em }
.hanging-indent:first-letter { float: left }
Strange that HTML is lacking a more complete hanging indent
function.
After some more thinking I found another solution with
float: left elements instead of a table, but it seems somewhat
awkward that way. Something like:
It works, and it looks a tad simpler than a table, but the table
has the advantage of automatic indent width determination.
Moreover those floats tend to go terribly wrong when something
else influences them. For example, it would go wrong if the
paragraphs already had a margin. This method requires
baby-sitting. A table is still the more resilient, but more
wordy solution.
Along the same lines, for a hanging indent we'd need something
like :first-word. Then the following would work:
p.hanging-indent { margin-left: 2em }
p.hanging-indent:first-word { float: left }
But we don't have that. And it would still fail if the tag
consists of more than one word, and it always needs manual
margin adjustment.
Any other idea that's more elegant than a table?
Hans-Georg
--
No mail, please.