clearance-006

Zero Clearance

WeasyPrint

This browser

Assertion
Zero clearance is not the same as no clearance.

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: Zero Clearance</title>
 5   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 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="Zero clearance is not the same as no clearance.">
 9   <style type="text/css">
10     div {
11       font: 20px/1em Ahem;
12       width: 5em;
13     }
14     .container {
15       border-top: solid green 1em;
16       border-bottom: solid red 1em;
17       height: 4em;
18     }
19     .before {
20       margin-bottom: 2em;
21     }
22     .float {
23       float: left;
24       height: 2em;
25     }
26     .clear {
27       clear: both;
28       margin-top: 2em;
29       height: 1em;
30       background: green;
31     }
32     </style>
33   </head>
34   <body>
35     <p>Test passes if there is no red visible on the page.</p>
36     <div class="container">
37       <div class="before"></div>
38       <div class="float"></div>
39       <div class="clear"></div>
40     </div>
41   </body>
42 </html>