position-relative-001

Relative positioning and normal flow

WeasyPrint

This browser

Assertion
Relatively positioned elements lay out in normal flow.

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: Relative positioning and normal flow</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="Relatively positioned elements lay out in normal flow.">
10         <style type="text/css">
11             #span1, #span2
12             {
13                 position: relative;
14             }
15         </style>
16     </head>
17     <body>
18         <p>Test passes if the letters below are all on the same line and they are in alphabetical order.</p>
19         <div>
20             <span id="span1">a</span>
21             <span>b</span>
22             <span id="span2">c</span>
23             <span>d</span>
24         </div>
25     </body>
26 </html>