table-cell-002

Image as 'display: table-cell'

WeasyPrint

This browser

Flags
image
Assertion
An image element can have a display value of 'table-cell'.

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: Image as 'display: table-cell'</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#table-display">
 7         <meta name="flags" content="image">
 8         <meta name="assert" content="An image element can have a display value of 'table-cell'.">
 9         <style type="text/css">
10             .table
11             {
12                 display: table;
13             }
14             .tr
15             {
16                 display: table-row;
17             }
18             .td
19             {
20                 background: blue;
21                 display: table-cell;
22                 height: 15px;
23                 width: 15px;
24             }
25             img
26             {
27                 display: table-cell;
28                 height: 15px;
29                 width: 15px;
30             }
31         </style>
32     </head>
33     <body>
34         <p>Test passes if there is a blue square below.</p>
35         <div class="table">
36             <div class="tr">
37                 <div class="td"></div>
38                 <div class="td"></div>
39             </div>
40             <div class="tr">
41                 <div class="td"></div>
42                 <img src="support/blue15x15.png" alt="THIS TEST FAILED.">
43             </div>
44         </div>
45     </body>
46 </html>