1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <title>CSS Test: Table height of 'auto' equals sum of row heights, cell spacing and borders</title>
5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
6 <link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#height-layout">
7 <meta name="flags" content="ahem">
8 <meta name="assert" content="A table height of 'auto' equals the sum of the row heights plus any cell spacing and borders.">
9 <style type="text/css">
10 div
11 {
12 font: 20px/1em Ahem;
13 }
14 #reference
15 {
16 background: blue;
17 height: 13em;
18 width: 12em;
19 }
20 table
21 {
22 background: black;
23 border-spacing: 1em;
24 height: auto;
25 padding: 0;
26 }
27 td
28 {
29 border: 1em solid black;
30 padding: 1em;
31 }
32 </style>
33 </head>
34 <body>
35 <p>Test passes if the boxes below are the same height.</p>
36 <div id="reference">
37 <table>
38 <tr>
39 <td>X</td>
40 </tr>
41 <tr>
42 <td>X</td>
43 </tr>
44 </table>
45 </div>
46 </body>
47 </html>