abspos-028

Abspos static position and clear

WeasyPrint

This browser

Assertion
The static position is calculated as if clear had been none.

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: Abspos static position and clear</title>
 5   <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#clipping">
 7   <meta name="flags" content="">
 8   <meta name="assert" content="The static position is calculated as if clear     had been none.">
 9   <style type="text/css">
10     .container {
11       width: 6em;
12       height: 1em;
13       background: red;
14     }
15     .float {
16       float: left;
17       width: 1em;
18       height: 4em;
19       background: white;
20     }
21     .abspos {
22       position: absolute;
23       clear: both;
24       width: 6em;
25       height: 1em;
26       background: green;
27     }
28   </style>
29  </head>
30  <body>
31     <p>There must be a green bar below and no red.</p>
32     <div class="container">
33       <div class="float"></div>
34       <div class="abspos"></div>
35     </div>
36  </body>
37 </html>