[CSS21] Float vertical positioning

Consider the following example:

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div
style="width:100px;height:200px;background-color:yellow;float:left;"/>
<p style="margin-top:20px;background-color:cyan">
Test test test. Test test test. Test test test. Test test test.
</p>
</body>
</html>

It seems from the spec that the first thing that should happen is
collapsing of the p and body top margin and only then the float is
positioned vertically, so the top edges of the p and div are aligned.
(This is what Mozilla, but not Opera does).

But this effectively means that no leading floats can be vertically
positioned until some inline content is encountered (or document ends).
Is that the intent? What should happen for the paginated media where
floats can cause page overflow before any inline content is encountered?

Peter

Received on Tuesday, 17 April 2007 17:15:58 UTC