table-anonymous-block-015

The anonymous block box around a table is not used for table percentage height

WeasyPrint

This browser

Assertion
Percentage height of table is relative to its anonymous box's containing block.

Source

 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: The anonymous block box around a table is not used for table percentage height</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#model">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Percentage height of table is relative to its anonymous box's containing block.">
 9         <style type="text/css">
10             #div1
11             {
12                 height: 400px;
13             }
14             #div2
15             {
16                 background: blue;
17                 float: left;
18                 height: 200px;
19                 width: 1ex;
20             }
21             table
22             {
23                 border-spacing: 0;
24                 height: 50%;
25             }
26             td
27             {
28                 background: black;
29                 padding: 0;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if the boxes below are the same height.</p>
35         <div id="div1">
36             <div id="div2"></div>
37             <table>
38                 <tr>
39                     <td>X</td>
40                 </tr>
41             </table>
42         </div>
43     </body>
44 </html>