1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3
4 <head>
5
6 <title>CSS Test: z-index - integer value</title>
7
8 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
9 <link rel="author" title="James Hopkins" href="james(a)idreamincode.co.uk">
10 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#z-index">
11 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#numbers">
12 <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors">
13 <meta content="invalid" name="flags">
14 <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">
15
16 <style type="text/css">
17 div
18 {
19 height: 100px;
20 position: absolute;
21 width: 100px;
22 }
23
24 #invalid-zindex
25 {
26 background-color: red;
27 z-index: 2.0;
28 }
29
30 #valid-zindex
31 {
32 background-color: green;
33 z-index: auto;
34 }
35 </style>
36
37 </head>
38
39 <body>
40
41 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
42
43 <div id="invalid-zindex"></div>
44
45 <div id="valid-zindex"></div>
46
47 </body>
48 </html>