W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: [CSS21] Another ambiguity in the definition of "containing block"

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 27 Sep 2009 17:56:11 -0400
Message-ID: <4ABFDF7B.2060209@mit.edu>
To: Boris Zbarsky <bzbarsky@mit.edu>
CC: Giovanni Campagna <scampa.giovanni@gmail.com>, www-style list <www-style@w3.org>
On 9/27/09 5:14 PM, Boris Zbarsky wrote:
>> Well, replacing "ancestor" with "ancestor's" may solve it, I think.
> Not really, no.

And just to make that clear, what should be the width of the green box 
in the following testcase?

<!DOCTYPE html>
<div style="display: table; width: 300px">
   <div style="display: table-row;">
     <div style="display: table-cell; width: 100px">x</div>
     <div style="width: 50%; height: 100px; background: green">y</div>

It's 100px wide in Gecko, Webkit, Opera 10, and IE8 (though removing the 
'x' and 'y' changes the rendering in Opera for reasons that I can't 
fathom).  So the anonymous table cell is clearly being the containing 
block in this case.  Why is the anonymous thing the containing block 
here, but not in the anonymous block case?

Received on Sunday, 27 September 2009 21:56:55 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC