floats-123

CSS Floats: Auto Sizing (with relative positioning)

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 (with relative positioning)</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/023.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    #container { display: block; width: 150px; background: red; position: relative; }
11    .float { float: left; 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 square below this line.</p>
17   <div id="container"><div class="float">X</div></div>
18  </body>
19 </html>