c5525-fltmrgn-000

float

WeasyPrint

This browser

Flags
ahem, image

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   <meta name="flags" content="ahem image">
 6   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#float">
 7   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 8   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 9   <style type="text/css">
10    div { background: red url(support/css1test5525b-0.png) no-repeat; color: green;
11          font: 15px/1 Ahem; padding: 0; width: 8em; border: solid black; }
12    img { float: left; color: red; }
13    .test1 { margin: 1em; background: red url(support/css1test5525b-1.png) no-repeat; }
14    .test2 { margin: 1em; background: red url(support/css1test5525b-2.png) no-repeat; }
15    .test2 img { margin-top: 0px; margin-left: 0px; height: 3em; }
16    .test3 { margin: 1em; background: red url(support/css1test5525b-3.png) no-repeat; }
17    .test3 img { margin-top: 30px; margin-left: 30px; height: 3em; }
18    .test4 { margin: 3em 1em 1em 3em; background: red url(support/css1test5525b-4.png) no-repeat; }
19    .test4 img { margin-top: -30px; margin-left: -30px; height: 3em; }
20    .test5 { margin: 1em; background: red url(support/css1test5525b-5.png) no-repeat; }
21    .test5 img { margin-right: 30px; margin-bottom: 30px; height: 3em; }
22    .test6 { margin: 1em; background: red url(support/css1test5525b-6.png) no-repeat; }
23    .test6 img { margin-right: -30px; margin-bottom: -30px; } /* has right height */
24   </style>
25   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#floats" title="9.5 Floats">
26   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#margin-properties" title="8.3 Margin properties: 'margin-top',  'margin-right',  'margin-bottom', 'margin-left', and 'margin'">
27  </head>
28  <body>
29   <p>There should be a tall green box below, with no red.</p>
30   <div>
31    <p class="test1">
32     x x x xx x x x
33    </p>
34    <p class="test2">
35     <img src="support/swatch-green.png" alt="FAIL">
36     x x x xx x x x
37    </p>
38    <p class="test3">
39     <img src="support/swatch-green.png" alt="FAIL">
40     x x x xx x x x
41    </p>
42    <p class="test4">
43     <img src="support/swatch-green.png" alt="FAIL">
44     x x x xx x x x
45    </p>
46    <p class="test5">
47     <img src="support/swatch-green.png" alt="FAIL">
48     x x x xx x x x
49    </p>
50    <p class="test6">
51     <img src="support/pattern-grg-rrg-rgg.png" alt="FAIL">
52     x x x xx x x x
53    </p>
54   </div>
55  </body>
56 </html>