left-offset-002

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

WeasyPrint

This browser

Assertion
Relative positioned elements with a left offset, offsets with respect to the left edge 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 'left' 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-right">
 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="Relative positioned elements with a left offset, offsets with respect to the left edge of the box itself.">
10         <style type="text/css">
11             #div1
12             {
13                 background: blue;
14                 height: 100px;
15                 position: relative;
16                 width: 100px;
17             }
18             div div
19             {
20                 background: white;
21                 height: 50px;
22                 position: relative;
23                 left: 50px;
24                 width: 50px;
25             }
26         </style>
27     </head>
28     <body>
29         <p>Test passes if there is a box below with top-right corner missing.</p>
30         <div id="div1">
31             <div></div>
32         </div>
33     </body>
34 </html>