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

Re: [css3-flexbox] containing block for absolutely positioned children of a flexbox

From: Daniel Holbert <dholbert@mozilla.com>
Date: Thu, 09 Feb 2012 11:01:02 -0800
Message-ID: <4F3417EE.8000000@mozilla.com>
To: www-style <www-style@w3.org>
One clarification -- of course, in my example, the abspos div's 
y-position would be taken from its static position which is inside the 
flexbox (at its placeholder's position).

But the part I'm wanting to sanity-check is that the x-position (from 
"left: 10px") is with respect to the outer div, not to the flexbox.


On 02/09/2012 10:05 AM, Daniel Holbert wrote:
> Just wanted to be sure I'm understanding correctly: flexboxes do *not*
> act as containing blocks for absolutely-positioned children, correct?
> Instead, the flexbox's closest ancestor that is a block will serve that
> purpose. (?)
> e.,g. if I have
> <div id="outer">
> <div style="display:flexbox">
> <div style="position:absolute; left: 10px">test</div>
> </div>
> <div>
> ...then my understanding is that the absolutely positioned element is
> positioned with respect to div#outer -- *not* with respect to the
> flexbox -- since div#outer is the containing block. Is that right?
> Thanks!
> ~Daniel
Received on Thursday, 9 February 2012 19:01:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:11 UTC