abspos-007.xht (1223B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Positioning blocks inside inline contexts with top:auto</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 7 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 --> 8 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/009.html" type="text/html"/> 9 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/> 10 <link rel="match" href="abspos-007-ref.xht" /> 11 12 <style type="text/css"> 13 .container div { height: 1em; width: 10em; } 14 .test { position: absolute; background: green; z-index: 1; } 15 .control { background: red; } 16 .inline { display: inline; } 17 </style> 18 </head> 19 <body> 20 <div class="container"> 21 <div class="inline"> 22 Test passes if there is <strong>no red</strong>. 23 <div class="test"></div> 24 <div class="control"></div> 25 </div> 26 </div> 27 28 </body> 29 </html>