z-index-016.xht (1411B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 5 <head> 6 7 <title>CSS Test: z-index - integer value</title> 8 9 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> 10 <link rel="author" title="James Hopkins" href="http://idreamincode.co.uk/css21testsuite" /> 11 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#z-index" /> 12 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#numbers" /> 13 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" /> 14 <link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> 15 16 <meta content="invalid" name="flags" /> 17 <meta content="Besides 'auto' and 'inherit' keyword values, z-index property can only accept an integer value. An integer consists of one or more digits '0' to '9'." name="assert" /> 18 19 <style type="text/css"><![CDATA[ 20 div 21 { 22 height: 100px; 23 position: absolute; 24 width: 100px; 25 } 26 27 #invalid-zindex 28 { 29 background-color: red; 30 z-index: 2.0; 31 } 32 33 #valid-zindex 34 { 35 background-color: green; 36 z-index: auto; 37 } 38 ]]></style> 39 40 </head> 41 42 <body> 43 44 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 45 46 <div id="invalid-zindex"></div> 47 48 <div id="valid-zindex"></div> 49 50 </body> 51 </html>