W3C home > Mailing lists > Public > www-style@w3.org > April 2007

[CSS21] Float vertical positioning

From: Peter Sorotokin <psorotok@adobe.com>
Date: Tue, 17 Apr 2007 10:15:38 -0700
Message-ID: <40CE68F1F8CAFB48B998C328517EA92A018E88DE@namail2.corp.adobe.com>
To: <www-style@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:50 GMT