abspos-overflow-009.xht (1249B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 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="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 --> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/009.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" /> 9 <link rel="match" href="abspos-overflow-006-ref.xht" /> 10 11 <style type="text/css"> 12 html, body { margin: 0; border: 0; padding: 0; } 13 .control { margin: 5em 0 0 5em; background: red; color: yellow; width: 5em; height: 5em; } 14 .overflow { overflow: auto; width: 8em; height: 8em; } 15 .positioned { position: absolute; top: 5em; left: 5em; background: green; color: white; width: 5em; height: 5em; } 16 </style> 17 </head> 18 <body> 19 <div class="control">FAIL</div> 20 <!-- There should be no scrollbars below. --> 21 <div class="overflow"> 22 <div class="positioned">PASS</div> 23 </div> 24 </body> 25 </html>