floats-115

CSS Floats: Auto Sizing

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: Auto Sizing</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/015.xml" type="application/xhtml+xml">
 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    .test { display: block; width: 200px; height: 50px; background: red; }
11    .float { float: left; background: green; color: green; font: 50px Ahem; }
12   </style>
13  </head>
14  <body>
15   <div class="control">Ahem_font_required_for_this_test.</div>
16   <p>There should be a green block below this line.</p>
17   <div class="test">
18    <div class="float">XXXX</div>
19   </div>
20  </body>
21 </html>