Re: [CSS21] display:block nested inside display:inline = display:inline-block ?

On Sep 7, 2008, at 2:48 AM, Anton Prowse wrote:

>
> I may just be being unobservant but I can't seem to find anything in  
> the CSS2.1 spec stating the formatting behaviour when an element  
> with display:block is the child of an element with display:inline.

See section 9.2.1.1, specifically:

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. When such an inline box is affected by relative  
positioning, the relative positioning also affects the block box.

--Brady

Received on Sunday, 7 September 2008 15:43:58 UTC