Do not create a shape object outside of the layout context
[WebKit-https.git] / LayoutTests / fast / block / float / previous-sibling-abspos-002.html
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: Avoid nested floats in previous siblings</title>
5         <link rel="author" title="WebKit" href="http://www.webkit.org/">
6         <style type="text/css">
7             #container
8             {
9                 width: 400px;
10             }
11             #div1
12             {
13                 height: 80px;
14                 width: 400px;
15                 position: absolute;
16             }
17             #float-right
18             {
19                 float: right; 
20                 height: 20px; 
21                 width: 400px; 
22                 background-color: green;
23             }
24             #div2
25             {
26                 /*'overflow: hidden' forces the div to avoid floats*/
27                 overflow: hidden; 
28                 font: 10px Ahem;
29                 color: red;
30             }
31         </style>
32     </head>
33     <body>
34         <p>There should be no red below.</p>
35         <div id="container">
36             <div id="div1">
37                 <div id="float-right"></div>
38             </div>
39             <div id="div2">You should not see this text</div>
40         </div>
41     </body>
42 </html>