In article <11**********************@g49g2000cwa.googlegroups .com>, Steve Pugh
says...
Paul Wake wrote: Why does the first thing work, but the second doesn't? The attempt is to style,
for printing purposes, an online document so that when printed it will look like
the original article. The original article had indented paragraphs, but when a
blockquote is inserted into the middle of a paragraph
the line after the blockquote should not be indented.
Hang on. It's impossible to insert a blockquote in the middle of a
paragraph.
<p>....<blockquote>...</blockquote>...</p>
should be treated by browsers as
<p>....</p><blockquote>...</blockquote>...
So what does your HTML actually look like?
<style type="text/css" media="print">
div#endnotes p { text-indent: 2em; margin-top: 0; margin-bottom: 0; }
div#endnotes p.followingenbqnoind { text-indent: 0em; }
</style>
<style type="text/css" media="print">
div#endnotes p { text-indent: 2em; margin-top: 0; margin-bottom: 0; }
p.followingenbqnoind { text-indent: 0em; }
</style>
These seem to refer to a paragraph after a blockquote, so not in "the
middle of a paragraph" at all.
In theory you should be able to use
div#endnotes blockquote+p {text-indent: 0em;}
to select all paragraphs that immediately follow a blockquote. In
prcatice IE doesn't support sibling selectors.
I thought that in the second example the
cascade should make the browser run with the more
specific example of not indenting that line, but none
of my browsers do it.
Specifity
http://www.w3.org/TR/CSS21/cascade.html#specificity
The selector p.followingenbqnoind has a specifity of 0011
which is not enough to override the selector div#endnotes p which has a
specificity of 0102
But I get what I want from the first example, which look
weird to me, what with the id and class together.
div#endnotes p.followingenbqnoind has a specificity of 0112 and so
overides the div#endnotes p
Nothing weird at all about using an id and a class in the same
selector.
Steve
Thanks. I was unclear. By "in the middle of the paragraph" I didn't mean in
terms of HTML formatting, but the way the quote is layed out in a text-type
printout. The file is
http://www.xmission.com/~wake/section27.html and an
example of the HTML (which I gather is wrong for improper use of blockquotes
also) is in endnote 69, and the HTML is here:
<p id="N69">69. <cite>Id</cite>. at 1007 n.11. Choosing and applying a
methodological approach is not always easy. In State v. Anderson, 910 P.2d 1229
(Utah 1996) (plurality opinion), the Court could not agree on what approach it
was actually using. <cite>See Id</cite>. at 1232-38, 1234 n.5, 1239 (Zimmerman,
C.J., concurring in the result) (interpreting Utah’s search and seizure
provision, which is textually similar to U.S. Constitution’s Fourth
Amendment, and finding it applies to vehicle searches). Justice Stewart
observed:</p>
<blockquote class="en">If this Court were to view its constitutional duty to
construe the provisions in the Utah Declaration of Rights in the exact same
manner as the United States Supreme Court construes analogous provisions in the
Bill of Rights, we would violate the spirit and intended effect of Utah
constitutional law and policy as established by the framers of the Utah
Constitution.</blockquote>
<p class="followingenbqnoind"><cite>Id</cite>. at 1240 (Stewart, J., concurring
in the result). However, not only was there disagreement between the justices
over the interpretation of Utah’s search and seizure provision (Article 1,
Section 14), but there was also
pointed disagreement over whether the lead opinion took a lockstep approach or
some other approach. <cite>See id</cite>. at 1235, 1239 (Zimmerman, C.J.,
concurring in the result); <cite>id</cite>. at 1241 (Durham, J., concurring
and dissenting).</p>