right-offset-001

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