bottom-offset-002

Position 'bottom' offset property - absolute length value and relative positioning

WeasyPrint

This browser

Assertion
The 'bottom' property, when using an absolute length value (not percentage) for relative positioning, specifies the offset of the box itself.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3     <head>
 4         <title>CSS Test: Position 'bottom' offset property - absolute length value and relative positioning</title>
 5         <link rel="author" title="Microsoft" href="http://www.microsoft.com/">
 6         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="The 'bottom' property, when using an absolute length value (not percentage) for relative positioning, specifies the offset of the box itself.">
10         <style type="text/css">
11             #div1
12             {
13                 background: blue;
14                 height: 1in;
15                 position: relative;
16                 width: 1in;
17             }
18             div div
19             {
20                 background: white;
21                 height: 0.5in;
22                 position: relative;
23                 bottom: -0.5in;
24                 width: 0.5in;
25             }
26         </style>
27     </head>
28     <body>
29         <p>Test passes if there is a box below with its bottom-left corner missing.</p>
30         <div id="div1">
31             <div></div>
32         </div>
33     </body>
34 </html>