z-index-applies-to-013.xht (1535B)
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 '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="assert" content="The 'z-index' property applies to elements with a display of 'table'." /> 9 <style type="text/css"> 10 #table 11 { 12 background: green; 13 display: table; 14 table-layout: fixed; 15 z-index: 1; 16 } 17 #row 18 { 19 display: table-row; 20 } 21 #cell 22 { 23 display: table-cell; 24 } 25 #zindex 26 { 27 background: red; 28 top: -1in; 29 } 30 #table, #zindex 31 { 32 height: 1in; 33 position: relative; 34 width: 1in; 35 } 36 </style> 37 </head> 38 <body> 39 <p>Test passes if there is no red visible on the page.</p> 40 <div id="table"> 41 <div id="row"> 42 <div id="cell"></div> 43 </div> 44 </div> 45 <div id="zindex"></div> 46 </body> 47 </html>