position-relative-018

Relative positioning and computed values when 'bottom' is set to 'auto'

WeasyPrint

This browser

Assertion
Computed value of 'bottom' set to 'auto' is equal to negative 'top'.

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: Relative positioning and computed values when 'bottom' is set to 'auto'</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#positioning-scheme">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="Computed value of 'bottom' set to 'auto' is equal to negative 'top'.">
 9         <style type="text/css">
10             .parent
11             {
12                 width: 0.5in;
13                 float: left;
14             }
15             div div
16             {
17                 background: black;
18                 height: 1in;
19                 position: relative;
20                 width: 0.5in;
21             }
22             #div1
23             {
24                 bottom: auto;
25                 top: 1in;
26             }
27             #div2
28             {
29                 bottom: -1in;
30                 top: auto;
31             }
32         </style>
33     </head>
34     <body>
35         <p>Test passes if there is one square on the page.</p>
36         <div class="parent">
37             <div id="div1"></div>
38         </div>
39         <div class="parent">
40             <div id="div2"></div>
41         </div>
42     </body>
43 </html>