z-index-005.xht (1659B)
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 set to zero</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-03 --> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-z-index" /> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#z-index" /> 9 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 10 11 <meta name="assert" content="The property z-index with a zero value is read and applied as the value '0'." /> 12 <style type="text/css"> 13 #div1 14 { 15 background: red; 16 height: 100px; 17 left: 0; 18 position: absolute; 19 top: 0; 20 width: 100px; 21 z-index: 0; 22 } 23 #div2 24 { 25 background: green; 26 height: 100px; 27 left: 0; 28 position: absolute; 29 top: 0; 30 width: 100px; 31 } 32 #wrapper 33 { 34 position: relative; 35 } 36 </style> 37 </head> 38 <body> 39 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 40 <div id="wrapper"> 41 <div id="div1"></div> 42 <div id="div2"></div> 43 </div> 44 </body> 45 </html>