- 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>
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 http://www.w3.org/TR/2007/CR-CSS21-20070719/visuren.html#anonymous-block-level says: # 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). -David -- L. David Baron http://dbaron.org/ Mozilla Corporation http://www.mozilla.com/
Received on Thursday, 7 February 2008 20:34:51 UTC