right-offset-003

Position 'right' property defines the offset from the right padding edge of the containing block for absolute positioning

WeasyPrint

This browser

Assertion
The 'right' property, for absolute positioning, specifies the offset of the element in relation to the containing block's right padding edge.

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