- From: Alan Gresley <alan@css-class.com>
- Date: Wed, 18 Jun 2008 12:57:32 +1000
- To: www-style@w3.org
I see in the spec, 10.3.5 Floating, non-replaced elements.
http://www.w3.org/TR/CSS21/visudet.html#float-width
# Roughly: calculate the preferred width by formatting the
# content without breaking lines other than where explicit
# line breaks occur, and also calculate the preferred minimum
# width, e.g., by trying all possible line breaks. CSS 2.1
# does not define the exact algorithm.
In this test case.
http://css-class.com/test/css/visformatting/floats/floats-width-auto.htm
There is a differences in line breaks between various implementations if
a line box appears before a float in the source (Example 1). This is the
typical markup and CSS.
<div style="float: left;">Float left
<div style="float: left; width: 120px;">Float Left</div>
</div>
Gecko 1.9 and Safari 3: The nested float clears the line box *Float
left* but leaves a space beside the float which equals the width of the
line box.
Opera 9.50 and IE8b1 (to memory) will not force a line break and the
line box *Float left* will appear beside the nested float.
This is a very common construction (using shrink-to-fit for outer float)
but having this undefined behavior with line breaks makes this
construction impractical for authors to use.
I would please welcome feedback concerning IE8b1 behavior or any part of
the specs that would explain what should happen.
Alan
Received on Wednesday, 18 June 2008 02:58:24 UTC