abspos-overflow-011

Positioning, Overflow, and Stacking: 'overflow:auto' as an in-flow sibling of a positioned element

WeasyPrint

This browser

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: Positioning, Overflow, and Stacking: 'overflow:auto' as an in-flow sibling of a positioned element</title>
 5   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 6   <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/011.html" type="text/html">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping">
 8   <style type="text/css">
 9    #outer {
10     position: relative;
11    }
12    #inner {
13     position: absolute; /* positioned relative to the containing block of the div that follows it */
14     top: 0;
15     background: white;
16     color: green;
17     width: 20em;
18    }
19    #content {
20     overflow: auto; /* this should have no effect on the stacking context calculations or painting order */
21     background: red;
22     color: yellow;
23     width: 20em;
24    }
25   </style>
26  </head>
27  <body>
28   <p>There should be no red below.</p>
29   <div id="outer">
30    <div id="inner"> This text should be green. </div>
31    <div id="content"> FAIL </div>
32  </div>
33  </body>
34 </html>