abspos-004.xht (1226B)
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 relative to the ICB: long root element</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/006-demo.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/> 9 <style type="text/css"> 10 .absolute { position: absolute; bottom: 0; left: 0; right: 0; 11 height: 5em; border: solid blue; } 12 html { height: 300em; min-height: 150%; border: orange; border-style: none solid; } 13 .control { border: solid yellow; } 14 * { margin: 0; padding: 0; } 15 </style> 16 </head> 17 <body> 18 <p class="absolute">This blue box should be at the bottom of the viewport 19 / first page.</p> 20 <p class="control">This yellow box should be at the top of the 21 viewport or first page. There should also be a blue box visible at the 22 bottom of the viewport / page.</p> 23 </body> 24 </html>