W3C home > Mailing lists > Public > www-style@w3.org > October 2003

Re: [CSS21] block formatting context/floats

From: <staffan.mahlen@comhem.se>
Date: Sun, 12 Oct 2003 22:38:23 +0200
To: Ian Hickson <ian@hixie.ch>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3F89D7DF.13755.2A8DAB4@localhost>

On 12 Oct 2003 at 13:47, Ian Hickson wrote:
> On Wed, 1 Oct 2003, staffan.mahlen@comhem.se wrote:
> > How do nested and adjacent block formatting contexts interact?
> 
> Depends on how they are formed. Floats, for instance, generate block
> formatting contexts, and flow around each other as per section 9.5.
> 
> In general, formatting contexts grow to contain their in-flow floats, but
> do not grow to contain out-of-flow content. 
If this is generally true i think it may be useful to spell that out 
in the rec (while it may be difficult to describe). If i understand 
correctly, absolutely positioned block formatting contexts do not 
affect containing block formatting contexts, while the others do 
(except for overflow:scroll containing an absolutely positioned 
element?). 
 
> However, for specific rules,
> you have to refer to the spec. For example, 'overflow:scroll' generates a
> new block formatting context that grows to contain any out-of-flow content
> (assuming the 'overflow:scroll' box is the containing block of the
> absolutely positioned block, or is a containing block ancestor of the
> containing block of the absolutely positioned block.
> 
> Does that answer your question?

I think so, at least the nesting bit. I'm not quite sure i got the 
adjacent part though.

Eg:
<div style="float: left; width:100px; height: 100px">A float</div>
<table>
	<tr>
		<td>A cell</td>
	</tr>
</table>
I'm not quite sure where in the rec that is defined (and i dont quite 
see why browsers implement it the way they seem to do). 

 /Staffan
Received on Sunday, 12 October 2003 16:38:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:24 GMT