abspos-022

position: fixed; top: auto; test - margin collapsing

WeasyPrint

This browser

Flags
may

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3 <head>
 4   <title>CSS Test: position: fixed; top: auto; test - margin collapsing</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/020-alt.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
 8   <meta name="flags" content="may">
 9   <style type="text/css">
10    html { margin: 0; padding: 0; }
11    body { margin: 0 10px; padding: 0; }
12    .a { position: static; top: 10px; left: 10px; width: 20em; height: 4em;
13         background: red; color: yellow; }
14    .b { position: fixed; top: auto; left: auto; width: 20em; height: 4em;
15         background: green; color: white; }
16    .c1 { margin: 2px; }
17    .c2 { margin: -4px 20px; }
18    .c3 { margin: 0 0 14px; }
19    .c4 { margin: 50px; }
20   </style>
21  </head>
22  <body>
23   <div class="c1">
24    <div class="c2">
25     <div class="c3"></div>
26    </div>
27   </div>
28   <div class="b">This block should be green.</div>
29   <div class="a">FAIL</div>
30   <div class="c4"></div>
31  
32 
33 </body>
34 </html>