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 'table-caption'</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="may">
9 <meta name="assert" content="The 'z-index' property can apply to elements with a display of 'table-caption'.">
10 <style type="text/css">
11 #test
12 {
13 background: green;
14 display: table-caption;
15 z-index: 1;
16 }
17 #table
18 {
19 display: table;
20 }
21 #row
22 {
23 display: table-row;
24 }
25 #cell
26 {
27 display: table-cell;
28 }
29 #zindex
30 {
31 background: yellow;
32 top: -1in;
33 }
34 #test, #zindex
35 {
36 height: 1in;
37 position: relative;
38 width: 1in;
39 }
40 </style>
41 </head>
42 <body>
43 <p>Test passes if there is a green or yellow box below.</p>
44 <div id="table">
45 <div id="test"></div>
46 <div id="row">
47 <div id="cell"></div>
48 </div>
49 </div>
50 <div id="zindex"></div>
51 </body>
52 </html>