margin-collapse-103

Margin Collapsing: fixed positioned

WeasyPrint

This browser

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: Margin Collapsing: fixed positioned</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/block/margin-collapse/003.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
 8   <style type="text/css">
 9    div.test { background: green; position: fixed; top: 4em; }
10    div.test div { background: red; margin: 5em 2.5em; }
11    div.control { height: 5em; width: 5em; background: red; position: fixed; top: 4em; }
12   </style>
13  </head>
14  <body>
15   <p>This page should have one square green block and no red.</p>
16   <div class="control"></div>
17   <div class="test">
18    <div></div>
19   </div>
20  
21 
22 </body>
23 </html>