Re: [css21] anonymous block boxes versus block boxes

On 12 Aug 2005 at 14:19, Anne van Kesteren wrote:
<snip/>
>  <http://annevankesteren.nl/test/css/float/001>
>  <http://annevankesteren.nl/test/css/float/002>
> 
> In the first testcase I have used this markup wherein the SPAN element is
> floated to the right:
> # <div>Test<span>Test</span></div>
> 
> Per rule 3 of section 9.7 in CSS 2.1 the computed value of the SPAN element its
> float property is 'block'. Per section 9.2.1.1 I would then assume that the the
> first four characters inside the DIV element, all before the start tag of the
> SPAN element, are inside an anonymous block box.

In my opinion the float is not in the normal flow and thus should not 
cause the anonymous box to be generated. Similarly, an absolutely 
positioned box there shouldn't force anonymous boxes either. I'm not 
sure if this view is supported by any text in the rec.

> Opera shows both words on the same line. Mozilla and Internet Explorer differ in
> this behavior and show the floated box on a second line. (I believe Safari and
> Internet Explorer 5 for the Mac do the same thing as Opera.)

I think that is just a difference in how they interpret points 6 and 
8 in
http://www.w3.org/TR/CSS21/visuren.html#float-position. 

In my opinion the Mozilla/IE way is better, since it creates less 
bouncy layout when the float can or cannot fit next to the current 
line contents. Both interpretations seem allowed by the rec though.

 /Staffan

Received on Friday, 12 August 2005 16:08:05 UTC