table-anonymous-block-014

The anonymous box around a table as an 'inline-block' box

WeasyPrint

This browser

Assertion
The anonymous box around a table is an 'inline-block' box if the table is inline-level.

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 box around a table as an 'inline-block' box</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="The anonymous box around a table is an 'inline-block' box if the table is inline-level.">
 9         <style type="text/css">
10             #table
11             {
12                 display: inline-table;
13                 background: orange;
14                 color: orange;
15             }
16             #div1
17             {
18                 color: silver;
19             }
20             #caption
21             {
22                 display: table-caption;
23                 color: blue;
24                 background: blue;
25             }
26             #tr
27             {
28                 display: table-row;
29             }
30             #td
31             {
32                 display: table-cell;
33             }
34         </style>
35     </head>
36     <body>
37         <p>Test passes if the blue box is stacked on top of the orange box, the boxes do not take up the whole width of the page, and "Filler Text" flows to the left and right of the orange bar.</p>
38         <div id="div1">Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
39             Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
40             Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
41         <div id="table">
42             <div id="caption">Filler TextFiller Text</div>
43             <div id="tr">
44                 <div id="td">Filler TextFiller Text</div>
45             </div>
46         </div>
47             Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
48             Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
49             Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
50             Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
51         </div>
52     </body>
53 </html>