position-005

Position set to 'inherit'

WeasyPrint

This browser

Assertion
The 'position' property applies the value 'inherit' and inherits the 'position' value from its parent element.

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 set to 'inherit'</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-position">
 7         <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position">
 8         <meta name="flags" content="">
 9         <meta name="assert" content="The 'position' property applies the value 'inherit' and inherits the 'position' value from its parent element.">
10         <style type="text/css">
11             #wrapper
12             {
13                 background: red;
14                 border: 3px solid orange;
15                 position: absolute;
16             }
17             #div1
18             {
19                 background: blue;
20                 left: 1in;
21                 position: inherit;
22                 top: 1in;
23             }
24         </style>
25     </head>
26     <body>
27         <p>Test passes if there is no red visible on the page, and the blue box shrinks to the size of the contents and is completely shifted below the tiny orange box.</p>
28         <div id="wrapper">
29             <div id="div1">Filler Text</div>
30         </div>
31     </body>
32 </html>