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 block</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 block.">
10 <style type="text/css">
11 span
12 {
13 background: green;
14 display: block;
15 z-index: 1;
16 }
17 #zindex
18 {
19 background: red;
20 top: -1in;
21 }
22 span, #zindex
23 {
24 height: 1in;
25 position: relative;
26 width: 1in;
27 }
28 </style>
29 </head>
30 <body>
31 <p>Test passes if there is no red visible on the page.</p>
32 <div>
33 <span></span>
34 </div>
35 <div id="zindex"></div>
36 </body>
37 </html>