[CSS2.1] 9.5.1 Positioning the float: the 'float' property

Concerning. 

9.5.1 Positioning the float: the 'float' property

http://www.w3.org/TR/CSS21/visuren.html#float-position


In the listed rules under the heading "Here are the precise rules that govern the behavior of floats"

There is no mention of the right edge for a left floated element or left edge of a right floated element. Since this is no mention of this opposing margin in the spec we now have two behaviors among browsers when elements are floated right.

1. This opposing left edge is ignored.
2. This opposing left edge is used.


Please see this test case (this case also applies to the body element).

http://css-class.com/test/css/overflow/float-container-margin-overflow.htm


Resize the browser window until the green element floated left is being hidden in the overflow container.

Gecko 1.7~1.8 and Opera 9.5: Will show the blue element floated right vanishing into the overflow containers' left edge. The padding-right of the overflow container is shown to the right of the green element floated right. Opera also shows a bug of showing a mysterious extra space to the right of the green element.

Safari 3.1: The blue float will get caught on the overflow containers' left-border-edge.

IE7~IE8: The blue float will get caught on the overflow containers' left-content-edge.

Opera 9.26 or earlier: The both the green and blue floats escape the overflow container to the right.

Gecko 1.9: Shows exactly the same as Gecko 1.7 and 1.8 but the padding-right is clipped from the overflow container. This clipping I have spoken about in my list messages.

http://lists.w3.org/Archives/Public/www-style/2008Mar/0401.html

http://lists.w3.org/Archives/Public/www-style/2008Jan/0265.html

http://lists.w3.org/Archives/Public/www-style/2008Jan/0268.html

Even though these are concerning [CSS2.1] 9.4.1 Block formatting context. The specs all tie in together (yes also with the containing block). I can't establish which behavior is correct in most cases because these answers aren't in the specs.

I only write to the CSS WG mailing list about this anyway since I presume that this would be the forum that I could get the answers.

I have given one test case. Should the overflow container left edge contain the blue element floated right edge or is Gecko 1.7~1.8 correct as I think it ought to be? The clipping of the padding right on the overflow container is another issue all together.


Alan

http://css-class.com/test/

Received on Friday, 28 March 2008 21:42:32 UTC