Bug 1729777 [wpt PR 30405] - Parsing for contain-intrinsic-size: auto <length>, a...
[gecko.git] / testing / web-platform / tests / css / CSS2 / margin-padding-clear / margin-collapse-162.xht
blob6aa2c8b5bd5bbf512a0f29b8bf249d8dbde7f7bd
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4   <title>CSS Test: Margin collapsing with floats before self collapsing children with margins collapsing with parent</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/062.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    /* This test requires half-decent z-index support */
10    /* Rendering should not not match 061.html! */
11    html { margin: 0; padding: 0; }
12    body { margin: 0 10px; padding: 0; }
13    .a { position: absolute; top: 46px; left: 10px; width: 20em; height: 4em; background: red; color: yellow; z-index: -1; }
14    .b { float: left; width: 20em; height: 4em; background: green; color: white; }
15    .c1 { margin: 2px; }
16    .c2 { margin: -4px 20px; }
17    .c3 { margin: 0 0 14px; }
18    .c4 { margin: 50px; }
19   </style>
20  </head>
21  <body>
22   <div class="c1">
23    <div class="c2">
24     <div class="c3"></div>
25    </div>
26   </div>
27   <div class="a">FAIL</div>
28   <div class="b">This block should be green.</div>
29   <div class="c4"></div>
32 </body>
33 </html>