margin-collapse-159

Margin Collapsing: in flow (height, simple) - not really margin collapsing

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: in flow (height, simple) - not really 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/block/margin-collapse/059.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    table { border-spacing: 0; font-size: 50px; border: solid; background: red; }
10    td { padding: 0; width: 1em; background: red; vertical-align: top; }
11 
12    .a { background: orange; }
13    .a .container { height: 1em; background: red; }
14    .a .sized { height: 3em; margin: 0 0 1em 0; background: aqua; }
15    .a .after { height: 1em; margin: 0 0 1em 0; background: yellow; }
16 
17    .b .a { border-top: solid aqua 1em; }
18    .b .b { border-top: solid yellow 1em; }
19    .b .c { border-top: solid aqua 1em; }
20    .b .d { border-top: solid orange 1em; }
21 
22   </style>
23  </head>
24  <body>
25   <p>The pattern below should be a stack of horizontal bars with no red.</p>
26   <table>
27    <tr>
28     <td class="a">
29      <div class="container">
30       <div class="sized"></div>
31      </div>
32      <div class="after"></div>
33     </td>
34     <td class="b">
35      <div class="a"></div>
36      <div class="b"></div>
37      <div class="c"></div>
38      <div class="d"></div>
39     </td>
40    </tr>
41   </table>
42   <p>This test is irrelevant if you don't pass <a href="056.html">test 056</a>.</p>
43  
44 
45 </body>
46 </html>