On 16/12/2010 9:39 PM, Chetan Crasta wrote:
It not that the spec disallowed it

The spec did explicitly disallow it, see point number 2:
http://www.w3.org/TR/2009/CR-CSS2-20090423/visuren.html#dis-pos-flo

Thank you, I was looking for that.

Absolutely positioned boxes are taken out of the normal flow

The phrase "taken out of the flow" is used a bit loosely in the spec.
Both absolutely positioned and floated elements are out of the flow,
the difference being that floated elements are still "visible" to
inline boxes.

No, "taken out of the flow" is not used a bit loosely. When you have a float, a UA generates something called a float holder. This is used to check if a run on inline boxes can sit beside the float, or before the float. This can be examined in great detail by how FF, Safari, Opera and IE8+ positions the line boxes appearing before the floats on this page.

http://css-class.com/test/css/visformatting/float-inline-content.htm

Adjusting the width of the viewport (especially from Example 3a to 4b) shows how the inline boxes jumps above the float when the width of the series of line boxes and the width of the floats combined is greater then the width of their containing block (in this instance the body). Some examples in this test case fails in early versions of Gecko 1.9. I believe FF 3.5 had fixed the bug and IE7-.


Float holders also help browsers calculate when a line of floats should begin to drop. This is with or without line boxes.

<http://css-class.com/test/css/visformatting/float-inline-content.htm>


Float holders also are used to help browsers know where to position line boxes (or with elements with a display value of inline) to properly flow around floats or better said, not having the text appear over the floats. See this test case which shows Safari 5 still failing two test.

<http://css-class.com/test/css/visformatting/floats-with-inline-elements2.htm>


WebKit renders this test different to other browser.

<http://css-class.com/test/css/visformatting/first-letter-floated-abc2.htm>

This is due to where WebKit places the float holder and something to do with differences between line boxes and line-height in WebKit and other brwosers. Philippe explains better.


I'm not sure why the spec disallowed combining absolute positioning
with floating, because it seems to be the only way an element could be
stretched to the width or height of its auto-height containing element
while being aligned to the left or right.
http://roughtech.com/t/posit.html example 5 and 6.

~Chetan


I do not know what you mean by "the only way an element could be stretched to the width or height of its auto-height containing element while being aligned to the left or right." What do you mean by stretched?


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

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to