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: Floated elements stacked with blocks and inline elements</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#floats">
7 <meta name="flags" content="">
8 <meta name="assert" content="Floated elements are rendered in front of non-positioned in-flow blocks but behind in-flow inline boxes when a normal flow box is next to a floated element with negative margins.">
9 <style type="text/css">
10 #container
11 {
12 margin: 0.5in;
13 }
14 #inline
15 {
16 background: yellow;
17 margin-left: -0.5in;
18 }
19 #float, #block
20 {
21 height: 1in;
22 width: 1in;
23 }
24 #float
25 {
26 background: orange;
27 float: left;
28 }
29 #block
30 {
31 background: blue;
32 margin: -0.25in;
33 }
34 </style>
35 </head>
36 <body>
37 <p>Test passes if the boxes are partially stacked on top of each other, and they are stacked in the following order from bottom to top: blue, orange, yellow.</p>
38 <div id="container">
39 <span id="inline">Filler Text</span>
40 <div id="float">Filler Text</div>
41 <div id="block">Filler Text</div>
42 </div>
43 </body>
44 </html>