c5525-fltblck-001

float

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: float</title>
 5   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#float">
 6   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 7   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 8   <style type="text/css">
 9    .outer { border: solid blue; border-bottom: 6em solid blue; background: navy; color: white; }
10    .float { float: right; width: 20em; background: teal; color: white; border: none; padding: 1em; margin: 0.5em; }
11    p { margin: 0; }
12   </style>
13   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" title="9.5 Floats">
14   <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#normal-block" title="10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'">
15  </head>
16  <body>
17   <div class="outer">
18    <div class="float">
19     <p>
20      This teal box should start inside the dark blue box and spill out
21      onto the blue area below it.
22     </p>
23    </div>
24    <p>
25     You should see a teal box to the right. ⇨
26    </p>
27   </div>
28  </body>
29 </html>