summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/margin-padding-clear/margin-collapse-119.xht
blob: 13e5517f01a9347c20be7a2ede2775cf3494b738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>CSS Test: Margin Collapsing: in flow (height)</title>
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/019.html" type="text/html"/>
  <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins"/>
  <style type="text/css">
   table { border-spacing: 0; font-size: 50px; border: solid; background: red; }
   td { padding: 0; width: 1em; }

   div.container, div.after { background: lime; }

   .a .container { height: 1.1em; }
   .a .sized { height: 1.0em; margin: 0 0 1em 0; }
   .a .after { height: 0.9em; }

   .b .container { height: 1.0em; }
   .b .sized { height: 1.0em; margin: 0 0 1em 0; }
   .b .after { height: 1.0em; }

   .c .container { height: 0.9em; }
   .c .sized { height: 1.0em; margin: 0 0 1em 0; }
   .c .after { height: 1.1em; }

  </style>
 </head>
 <body>
  <p>There should be no red on this page.</p>
  <table>
   <tr>
    <td class="a">
     <div class="container">
      <div class="sized"></div>
     </div>
     <div class="after"></div>
    </td>
    <td class="b">
     <div class="container">
      <div class="sized"></div>
     </div>
     <div class="after"></div>
    </td>
    <td class="c">
     <div class="container">
      <div class="sized"></div>
     </div>
     <div class="after"></div>
    </td>
   </tr>
  </table>
  <p>See also: <a href="http://www.hixie.ch/tests/adhoc/css/box/block/height/002.html">prerequisite</a>.</p>


</body>
</html>