abspos-overflow-009

Absolutely positioned children of overflow: auto

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: Absolutely positioned children of overflow: auto</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/overflow/009.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping">
 8   <style type="text/css">
 9    html, body { margin: 0; border: 0; padding: 0; }
10    .control { margin: 5em 0 0 5em; background: red; color: yellow; width: 5em; height: 5em; }
11    .overflow { overflow: auto; width: 8em; height: 8em; }
12    .positioned { position: absolute; top: 5em; left: 5em; background: green; color: white; width: 5em; height: 5em; }
13   </style>
14  </head>
15  <body>
16   <div class="control">FAIL</div>
17   <!-- There should be no scrollbars below. -->
18   <div class="overflow">
19    <div class="positioned">PASS</div>
20   </div>
21  </body>
22 </html>