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' property defines the offset from the left padding edge of the containing block for absolute 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="The 'left' property, for absolute positioning, specifies the offset of the element in relation to the containing block's left padding edge.">
10 <style type="text/css">
11 #container
12 {
13 border: solid blue;
14 height: 1in;
15 padding-left: 0.25in;
16 position: relative;
17 width: 1in;
18 }
19 #div1
20 {
21 background: black;
22 height: 0.5in;
23 position: absolute;
24 left: 0.75in;
25 width: 0.5in;
26 }
27 #div2
28 {
29 height: 1in;
30 width: 1in;
31 }
32 </style>
33 </head>
34 <body>
35 <p>Test passes if there is a black box in the upper-right corner of the blue box.</p>
36 <div id="container">
37 <div id="div1"></div>
38 <div id="div2"></div>
39 </div>
40 </body>
41 </html>