W3C home > Mailing lists > Public > www-style@w3.org > February 2008

Re: [CSS2.1 position:relative] Blocks Contained in Inline Relative.

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 7 Feb 2008 12:34:39 -0800
To: www-style@w3.org
Cc: Alex Mogilevsky <alexmog@exchange.microsoft.com>
Message-ID: <20080207203439.GA6597@ridley.dbaron.org>

On Thursday 2008-02-07 11:59 -0800, Alex Mogilevsky wrote:
> When a block with a static position is contained in an inline block with "position:relative", should the relative offset apply to it?
> 9.3.1 http://www.w3.org/TR/CSS21/visuren.html#choose-position
> Doesn't have any special cases for blocks within relative inlines. And position doesn't inherit.
> 10.1. http://www.w3.org/TR/CSS21/visudet.html#containing-block-details
> Clearly says that the relative inline is clearly not the containing block for nested blocks.

These sections aren't really relevant here because another section
of the spec describes how the rendering tree (of boxes) is modified
when a block occurs within an inline.  In particular

# 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. 

This explicitly answers your question about relative positioning
(although without that statement it would be pretty clearly the
opposite, since the box is not contained inside the inline).


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Thursday, 7 February 2008 20:34:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:33 UTC