z-index-applies-to-010.xht (1387B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Z-index applied to element with 'display' set to list-item</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="assert" content="The 'z-index' property applies to elements with a display of list-item." /> 9 <style type="text/css"> 10 body 11 { 12 margin-left: 1em; 13 } 14 #div1 15 { 16 background: green; 17 display: list-item; 18 z-index: 1; 19 } 20 #zindex 21 { 22 background: red; 23 top: -1in; 24 } 25 #div1, #zindex 26 { 27 height: 1in; 28 position: relative; 29 width: 1in; 30 } 31 </style> 32 </head> 33 <body> 34 <p>Test passes if there is no red visible on the page and there is a marker bullet on the left-hand side of the box.</p> 35 <div id="div1"></div> 36 <div id="zindex"></div> 37 </body> 38 </html>