473,320 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Is This a Cascade Problem, or a Cluelessness Problem?

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. 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. But I get what I want from
the first example, which look weird to me, what with the id and class together.
Thanks.

<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>
Jul 24 '05 #1
2 1585
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

Jul 24 '05 #2
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&rsquo;s search and seizure
provision, which is textually similar to U.S. Constitution&rsquo;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&rsquo;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>
Jul 24 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fraser Hanson | last post by:
Hello, I have a table which has a foreign key relationship with itself. I want and expect my updates to cascade (deletes definitely cascade as expected) but instead I just get error 1217:...
1
by: Andrew DeFaria | last post by:
I created the following .sql file to demonstrate a problem I'm having. According to the manual: If |ON DELETE CASCADE| is specified, and a row in the parent table is deleted, then InnoDB...
2
by: Gunnar Vøyenli | last post by:
Hi! For the sake of simplicity, I have three tables, Employee, Department and Work Employee >---- Department \ / \ / ^ ^ Work
2
by: P.B. via SQLMonster.com | last post by:
I cannot execute my sql to create a table with ON DELETE CASCADE option. Here is my sql: CREATE TABLE Employees (Name Text(10) not null, Age number, CONSTRAINT pkEmployees PRIMARY KEY (Name)); ...
2
by: Jack | last post by:
We are have a question about the no cascade option on before triggers. The description stays that no other triggers will be fired by the changes of a before trigger. One of our developers is...
33
by: Lee C. | last post by:
I'm finding this to be extremely difficult to set up. I understand that Access won't manage the primary key and the cascade updates for a table. Fine. I tried changing the PK type to number and...
3
by: hilz | last post by:
Hi all I am trying to create a relation between two tables. this is the sql statement in question alter table T1 add constraint relation_T1_to_T2 foreign key (T2_ID) references T2 (ID) on...
14
by: Karl O. Pinc | last post by:
Hi, Thought perhaps some other eyes than mine can tell if I'm doing something wrong here or if there's a bug somewhere. I've never passed a ROWTYPE varaible to a function but I don't see where...
0
by: Cirene | last post by:
Can you assist me with this database problem? I have 4 tables in my db.... Table1 (key: Table1Id) Table2 (key: Table2Id) Table3 (key: Table3Id) Table 4 has these fields: key: Table4Id...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.