Re: block box inside inline box ?

Randy Fellmy (Coises) critiqued my example of anonymous block boxes:

> This cannot be correct.  The <block> element is no longer a descendant of
> the <inline> element... in fact, the <inline> element has been made into
> two elements.  Etan did note at the end of the post that this part of the
> example is "deceptive."  I suggest that it's not so much "deceptive" as
> "wrong."  I see nothing in the standard that supports this reconstruction.

CSS has no tree transformation capabilities, so naturally my example, taken literally, 
has no basis in CSS specifications.  I agree that it is wrong in a sense, but I argue that it 
is a useful lie in that it helps to visualize the box layout.  I was demonstrating the 
creation of boxes, not the workings of inheritance or contextual selection.  If the example 
is wrong about the boxes created (and please tell us if so), then it is badly wrong.

If you want, I can redo the example with processing instructions to indicate the 
anonymous boxes, preserving the element tree.

> The problem, it seems, is that [...]
> there appears to be no corresponding section that explains what happens
> when an inline element contains a block box --- though as far as I can
> tell, that is not explicitly forbidden, either.

Some people have been explicit that blocks within inlines are allowed.  Nobody has 
countered that.  A note of permission in the specifications sure would help, though.

> Intuitively, I would expect this:
> 
> 1. The <block> content must be formatted as a block.  In the absence of a
> "width" property or (for a replaced element) an intrinsic width, it would
> fill the width of containing block (which I presume would be the width of
> the content area of the <#anonymous-block>).

I would simply say that the containing block for the block box is identical to the 
containing block for its inline-level parent.

> 2. This rectangular <block> element would be placed within a line box in
> the same way as any other indivisible element (like a word or an IMG).

This is a useful model.  The line box containing the block box extends from the margin 
before edge to the margin after edge, regardless of line stacking strategy, right?

-- 
Etan Wexler <mailto:ewexler@stickdog.com>

Received on Friday, 14 June 2002 16:16:51 UTC