abspos-008.xht (1194B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Shrink wrapping of absolute positioned blocks</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/011.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/> 9 <link rel="match" href="abspos-008-ref.xht" /> 10 11 <style type="text/css"> 12 .container { font-size: 100px; position: relative; border-top: 10px solid white; } 13 .outer { position: absolute; top: 0; left: 0; z-index: 1; } 14 .inner { background: green; color: white; float: left; } 15 .control { float: left; color: yellow; background: red; } 16 </style> 17 </head> 18 <body> 19 <p>Test passes if there is <strong>no red</strong>.</p> 20 <div class="container"> 21 <div class="outer"> 22 <div class="inner"> 23 X X0 24 </div> 25 </div> 26 <div class="control">X X1</div> 27 </div> 28 29 </body> 30 </html>