clear-inline-001

Clear on inline elements

WeasyPrint

This browser

Assertion
Clear cannot be applied to an inline box.

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: Clear on inline elements</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#flow-control">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Clear cannot be applied to an inline box.">
 9         <style type="text/css">
10             #span1
11             {
12                 background-color: orange;
13                 float: left;
14                 height: 1in;
15                 width: 1in;
16             }
17             #span2
18             {
19                 background: blue;
20                 clear: left;
21             }
22         </style>
23     </head>
24     <body>
25         <p>Test passes if the blue box is to the right of the orange box.</p>
26         <div>
27             <span id="span1"></span>
28             <span id="span2">Filler Text</span>
29         </div>
30     </body>
31 </html>