abspos-003

Positioning relative to the ICB: short root element

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: Positioning relative to the ICB: short 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/005-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    p { margin: 0; padding: 0.5em; }
11    .absolute { position: absolute; bottom: 0; left: 0; right: 0;
12                height: 5em; border: solid blue; }
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 
24 </body>
25 </html>