floats-136

CSS Floats: Wrapping blocks around floats

WeasyPrint

This browser

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: CSS Floats: Wrapping blocks around floats</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/float/036.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats">
 8   <style type="text/css">
 9    .control { display: inline; font: 1em/1 Ahem, sans-serif; background: red; color: white; }
10    .container { font: 30px/1 Ahem; color: green; margin: 0; padding: 0; border: 0;
11                 background: url(support/60x60-red.png) no-repeat;
12                 text-indent: 0; }
13    .float { width: 1em; height: 1em; background: green; float: left;
14             margin: 0; padding: 0; border: 0; }
15   </style>
16  </head>
17  <body>
18   <div class="control">Ahem_font_required_for_this_test.</div>
19   <p>There should just be one green rectangle below.</p>
20   <div class="container">
21    <div class="float"></div>
22    X
23   </div>
24  </body>
25 </html>