float-005

float

WeasyPrint

This browser

Flags
ahem
Assertion
A non-positioned block box created after a float box should flow vertically as if the float did not exist. The line boxes created next to the float should be shortened to make room for that preceding floated box.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 
 4  <head>
 5 
 6   <title>CSS Test: float</title>
 7 
 8   <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
 9   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats">
10   <meta content="ahem" name="flags">
11   <meta content="A non-positioned block box created after a float box should flow vertically as if the float did not exist. The line boxes created next to the float should be shortened to make room for that preceding floated box." name="assert">
12 
13   <style type="text/css">
14   div#left-floated-square
15   {
16   color: blue;
17   float: left;
18   font: 100px/1 Ahem;
19   }
20 
21   div#non-positioned-block-square-after
22   {
23   background-color: black;
24   height: 200px;
25   width: 200px;
26   }
27   </style>
28 
29  </head>
30 
31  <body>
32 
33   <p>Test passes if a blue square fills the upper left corner of a bigger black square.</p>
34 
35   <div id="left-floated-square">X</div>
36 
37   <div id="non-positioned-block-square-after"></div>
38 
39  </body>
40 </html>