floats-021

Right floated elements and text wrapping

WeasyPrint

This browser

Assertion
Block box is generated and floated to right and content flows on left side starting at the top.

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: Right floated elements and text wrapping</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#floats">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Block box is generated and floated to right and content flows on left side starting at the top.">
 9         <style type="text/css">
10             div
11             {
12                 width: 2in;
13             }
14             #span1
15             {
16                 background-color: blue;
17                 float: right;
18                 height: 1in;
19                 width: 1in;
20             }
21         </style>
22     </head>
23     <body>
24         <p>Test passes if the words "Filler Text" start above the blue box and flow down the left side of and wrap underneath the blue box.</p>
25         <div>
26             <span>Filler Text Filler Text Filler Text </span>
27             <span id="span1"></span>
28             <span>Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text</span>
29         </div>
30     </body>
31 </html>