position-relative-033

Relatively positioned box has no impact on boxes which follow and boxes may overlap

WeasyPrint

This browser

Flags
may
Assertion
Offsetting a box with relative positioning has no effect on the boxes which follow and boxes may overlap.

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: Relatively positioned box has no impact on boxes which follow and boxes may overlap</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#comp-relpos">
 7         <meta name="flags" content="may">
 8         <meta name="assert" content="Offsetting a box with relative positioning has no effect on the boxes which follow and boxes may overlap.">
 9         <style type="text/css">
10             span
11             {
12                 color: orange;
13                 font: 16px Ahem;
14             }
15             #span1
16             {
17                 border: 2px solid blue;
18             }
19             #span2
20             {
21                 color: yellow;
22                 position: relative;
23                 left: -6em;
24             }
25         </style>
26     </head>
27     <body>
28         <p>Test passes if below the yellow box is on the left-hand side of the blue box and the orange box is on the right-hand side fo the blue box.</p>
29         <div>
30             <span id="span1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="span2">XXXXXX</span>XXXXXX</span>
31         </div>
32     </body>
33 </html>