inline-formatting-context-015

Line boxes next to floats

WeasyPrint

This browser

Assertion
Line boxes adjust for floated elements.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Line boxes next to floats</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#inline-formatting">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Line boxes adjust for floated elements.">
 9         <style type="text/css">
10             #div1
11             {
12                 width: 200px;
13             }
14             #div2
15             {
16                 border: 5px solid blue;
17                 height: 20px;
18                 float: left;
19                 width: 50%;
20             }
21             #div3
22             {
23                 background: orange;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if the "Filler Text" is to the right of the blue box and an orange background covers the area behind both the "Filler Text" and the blue box.</p>
29         <div id="div1">
30             <div id="div2"></div>
31             <div id="div3">Filler Text Filler Text</div>
32         </div>
33     </body>
34 </html>