[CSS2.1] float positioning rules

Hi all / Fantasia,

According to the rules that govern the behavior of floats (section
9.5.1), we would expect the floating div, in the example below, to be
positioned at the same top position as the paragraph. It satisfies rule
8 (placing a floating box as high as possible) and violates none of the
rules. This seems awkward, but also differs from other major
implementations.

Can anybody clarify on this matter? Are there any anonymous boxes
created around floats to ease the formatting?

Sample XHTML:
---------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <style type="text/css">
        div.yellow
        {
            width: 50pt; 
            height: 50pt;
            border: thin solid black; 
            float: left;     
        }
  </style>
</head>
<body>
    <p>Text</p><div class="yellow"></div>
</body>
</html>
-----------------------


Thanks in advance.

Regards,
Robert Stam

Received on Wednesday, 12 November 2008 09:56:41 UTC