position-relative-034

Relatively positioned content inside container with overflow auto

WeasyPrint

This browser

Flags
interact
Assertion
A container with overflow set to auto provides a scrolling mechanism for relatively positioned content.

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 content inside container with overflow auto</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="interact">
 8         <meta name="assert" content="A container with overflow set to auto provides a scrolling mechanism for relatively positioned content.">
 9         <style type="text/css">
10             div
11             {
12                 border: solid;
13                 overflow: auto;
14                 width: 200px;
15             }
16             span
17             {
18                 position: relative;
19                 left: 200px;
20             }
21         </style>
22     </head>
23     <body>
24         <p>Test passes if the box below can be scrolled to the words "Filler Text".</p>
25         <div>
26             <span>Filler Text</span>
27         </div>
28     </body>
29 </html>