On Tue, 24 Apr 2007 23:16:54 +0300, "Jukka K. Korpela"
<jk******@cs.tut.fiwrote:
Scripsit Kent Feiler:
I was using CSS of:
p + p {...}
...to indent secondary paragraphs in conversations and descriptive
text. This allows not including a class on every secondary <ptag,
of
which there are often several for each beginning <p>.
That's indeed the most logical approach, but...
I just noticed
that while this works fine in FF, it doesn't work at all in IE.
Actually, it works in IE 7, but only in Standards Mode (i.e. when you
have a correct doctype declaration at the start of the document).
Is there a way to accomplish this that will work in both IE and FF?
You could use class attributes but for the paragraphs that do not
follow another paragraphs, i.e. just for the first <pelement in a
sequence of such elements.
Or you could use
p { text-indent: 1.3em; margin: 0; }
h2+p, h3+p, h4+p, h5+p, h6+p, table+p, ul+p, ol+p, dl+p, div+p
{ text-indent: 0; }
That way, IE 6 and older would use text indent for _all_ paragraphs,
which is perhaps tolerable (I've seen many books and serials that use
such style), and newer browsers would indent only paragraphs that do
not follow a heading or list or ... (you may need to tune the list;
the above is just a sketch).
------------------------------------------------------------------------
Nice idea! Although the guy who was the master of style when HTML and
CSS were just alphabet soup, William J. Strunk in "The Elements of
Style", might complain a bit. Indent-all-paragraphs is way better than
"engineering paragraphs" but it still misses something. The unindented
paragraph (preceeded by blank line) is a kind of reset button, I'd
hate to lose it.
Maybe I should just forget about old versions of IE, but I dunno, it
seems right to at least go back to Current - 1.
Regards,
Kent Feiler
www.KentFeiler.com