z-index-applies-to-014

Z-index applied to element with 'display' set to 'inline-table'

WeasyPrint

This browser

Assertion
The 'z-index' property applies to elements with a display of 'inline-table'.

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: Z-index applied to element with 'display' set to 'inline-table'</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-z-index">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#z-index">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="The 'z-index' property applies to elements with a display of 'inline-table'.">
10         <style type="text/css">
11             div
12             {
13                 line-height: 0;
14             }
15             #table
16             {
17                 background: green;
18                 display: inline-table;
19                 table-layout: fixed;
20                 z-index: 1;
21             }
22             #row
23             {
24                 display: table-row;
25             }
26             #cell
27             {
28                 display: table-cell;
29             }
30             #zindex
31             {
32                 background: red;
33                 top: -1in;
34             }
35             #table, #zindex
36             {
37                 height: 1in;
38                 position: relative;
39                 width: 1in;
40             }
41         </style>
42     </head>
43     <body>
44         <p>Test passes if there is no red visible on the page.</p>
45         <div>
46             <div id="table">
47                 <div id="row">
48                     <div id="cell"></div>
49                 </div>
50             </div>
51             <div id="zindex"></div>
52         </div>
53     </body>
54 </html>