By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,394 Members | 1,912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,394 IT Pros & Developers. It's quick & easy.

questions about CSS 2.1 spec?

P: n/a
I've bought two books on CSS, and found they're no good.
Now I'm reading "Cascading Style Sheets, level 2 revision 1
CSS 2.1 Specification" , but it's tough going.

I have lots of questions about parts in that spec. Does anyone know who can
answer them?
Is there maybe an "Annotated CSS 2.1 Spec" ? That is, one with extra
explanation added to every complex piece of text.

As an example of two of my questions:
In:
section 9.2 Block-level elements and block boxes
Text:
When an inline box contains a block box, the inline box (and its inline
ancestors within the same line box) are broken around the block. The line
boxes before the break and after the break are enclosed in anonymous boxes,
and the block box becomes a sibling of those anonymous boxes.
Question:
Should "... are enclosed in anonymous boxes ..." actually say "... are
enclosed in anonymous block boxes ..." !?
Question:
Could I please have an example of "inline ancestors within the same line
box" .

Note:
The two books that I bought, are:
"Cascading Style Sheets, The Definitive Guide", by Eric Meyer;
"Designing with Web Standards", by Jeffrey Zeldman .
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On Tue, 25 May 2004 13:56:21 +0200, Paul <pv******@xs4all.nl> wrote:

When an inline box contains a block box, the inline box (and its
inline
ancestors within the same line box) are broken around the block. The line
boxes before the break and after the break are enclosed in anonymous
boxes,
and the block box becomes a sibling of those anonymous boxes.

Question:
Should "... are enclosed in anonymous boxes ..." actually say "... are
enclosed in anonymous block boxes ..." !?
Question:
Could I please have an example of "inline ancestors within the same
line
box" .
I am pretty sure this means that

<span>lalala<p>lalala</p>lalala</span>

is really rendered as

<span>lalala</span><p><span>lalala</span></p><span>lalala</span>

Note:
The two books that I bought, are:
"Cascading Style Sheets, The Definitive Guide", by Eric Meyer;
"Designing with Web Standards", by Jeffrey Zeldman .


Those are quite reputable books. What do you find to be "no good" about
them?
Jul 20 '05 #2

P: n/a
"Paul" <pv******@xs4all.nl> wrote:
I've bought two books on CSS, and found they're no good.
Now I'm reading "Cascading Style Sheets, level 2 revision 1
CSS 2.1 Specification" , but it's tough going.
Note that CSS 2.1 is not yet a W3C Recommendation.
I have lots of questions about parts in that spec. Does anyone know who can
answer them?
Here is as good a place as any.
Is there maybe an "Annotated CSS 2.1 Spec" ? That is, one with extra
explanation added to every complex piece of text.
Not that I'm aware of.
As an example of two of my questions:
In:
section 9.2 Block-level elements and block boxes
Text:
When an inline box contains a block box, the inline box (and its inline
ancestors within the same line box) are broken around the block. The line
boxes before the break and after the break are enclosed in anonymous boxes,
and the block box becomes a sibling of those anonymous boxes.
Question:
Should "... are enclosed in anonymous boxes ..." actually say "... are
enclosed in anonymous block boxes ..." !?
I think that as the text in question is in a section headed "Anonymous
block boxes" then you can assume that.
Question:
Could I please have an example of "inline ancestors within the same line
box" .
here is <b>some bold <i>and italic</i> text</b>

The <b> element is an inline ancestor of the <i> element and if they
are both displayed on the same line then they are within the same line
box.
Note:
The two books that I bought, are:
"Cascading Style Sheets, The Definitive Guide", by Eric Meyer;
Probably one of the best guides to CSS in book form. Presumably you
bought this recently and have the second edition?
"Designing with Web Standards", by Jeffrey Zeldman .


An interesting opinion piece, but not a guide to actual code.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

P: n/a
Neal <ne*****@yahoo.com> wrote:
On Tue, 25 May 2004 13:56:21 +0200, Paul <pv******@xs4all.nl> wrote:
When an inline box contains a block box, the inline box (and its
inline ancestors within the same line box) are broken around the block.
The line boxes before the break and after the break are enclosed in
anonymous boxes, and the block box becomes a sibling of those anonymous
boxes.

Question:
Should "... are enclosed in anonymous boxes ..." actually say "... are
enclosed in anonymous block boxes ..." !?


I am pretty sure this means that

<span>lalala<p>lalala</p>lalala</span>

is really rendered as

<span>lalala</span><p><span>lalala</span></p><span>lalala</span>


No. It is not the place of the CSS spec to say anything about how user
agents should fix broken markup; any such fixing should be done before
CSS is applied.

Further, span is not an anonymous box. Anonymous boxes are those that
are not associated with any HTML (or other markup language) element.

The example given in the spec for the text quoted by the OP is:

body { display: inline }
p { display: block }

<BODY>
This is anonymous text before the P.
<P>This is the content of P.</P>
This is anonymous text after the P.
</BODY>

cheers,
Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4

P: n/a
On Tue, 25 May 2004 13:17:59 +0100, Steve Pugh <st***@pugh.net> wrote:
Neal <ne*****@yahoo.com> wrote:
I am pretty sure

No.


Thanks for setting me straight. Still a lot to figure out...
Jul 20 '05 #5

P: n/a
Steve Pugh <st***@pugh.net> wrote:
I've bought two books on CSS, and found they're no good.
Now I'm reading "Cascading Style Sheets, level 2 revision 1
CSS 2.1 Specification" , but it's tough going.


Note that CSS 2.1 is not yet a W3C Recommendation.


Also note that it's a Candidate Recommendation, and imo generally a
better start than the 2.0 Rec.
--
Spartanicus
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.