Do not create a shape object outside of the layout context
[WebKit-https.git] / LayoutTests / fast / block / float / previous-sibling-float-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                 background-color:green;
10                 width: 400px;
11                 overflow: hidden;
12                 height:40px
13             }
14             #div1
15             {
16                 height: 40px;
17             }
18             #float-right
19             {
20                 float: right; 
21                 height: 40px; 
22                 width: 400px; 
23                 background-color: green;
24             }
25             #div2
26             {
27                 /*'overflow: hidden' forces the div to avoid floats*/
28                 overflow: hidden; 
29                 margin-top: -30px;
30                 font: 20px Ahem;
31                 color: red;
32             }
33         </style>
34     </head>
35     <body>
36         <p>There should be no red below.</p>
37         <div id="container">
38             <div id="div1">
39                 <div id="float-right"></div>
40             </div>
41             <div id="div2">Text</div>
42         </div>
43     </body>
44 </html>