z-index-abspos-006

CSS: z-index and SELECT elements

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html lang="en">
 3  <head>
 4   <title>CSS Test: CSS: z-index and SELECT elements</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/z-index/006.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#z-index">
 8   <link rel="help" href="http://www.w3.org/TR/CSS21/zindex.html#painting-order">
 9   <style type="text/css">
10    * { font: 1em serif; }
11    .a { position: absolute; z-index: 2; top: 2em; left: 2em; width: 13em; background: green; color: white; padding: 1em; }
12    .b { position: absolute; z-index: 1; top: 2.5em; left: 2.5em; background: red; color: yellow; height: 3em; }
13   </style>
14  </head>
15  <body>
16    <div class="test a"> There should be no red, nor any scroll bars, on this page. </div>
17    <select class="test b" size="3">
18     <option>FAIL FAIL FAIL FAIL</option>
19     <option>FAIL FAIL FAIL FAIL</option>
20     <option>FAIL FAIL FAIL FAIL</option>
21    </select>
22  </body>
23 </html>