top-019

Top using points with a nominal value, 72pt

WeasyPrint

This browser

Assertion
The 'top' property sets a nominal length value in points.

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: Top using points with a nominal value, 72pt</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-top">
 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 'top' property sets a nominal length value in points.">
10         <style type="text/css">
11             div
12             {
13                 position: relative;
14             }
15             #div1
16             {
17                 margin-top: -72pt;
18             }
19             #div2
20             {
21                 background: red;
22                 height: 72pt;
23                 margin-top: 72pt;
24                 position: absolute;
25                 top: 0;
26                 width: 100%;
27             }
28             #div3
29             {
30                 border-bottom: 72pt solid black;
31                 top: 72pt;
32             }
33         </style>
34     </head>
35     <body>
36         <p>Test passes if there is no red visible on the page.</p>
37         <div id="div1">
38             <div id="div2"></div>
39             <div id="div3"></div>
40         </div>
41     </body>
42 </html>