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: Floats and block level replaced element margins</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="image">
8 <meta name="assert" content="The border box of a block level replaced element cannot overlap any floats in the same block formatting context as the element itself.">
9 <style type="text/css">
10 #div1
11 {
12 width: 2in;
13 height: 2in;
14 border: black solid 5px;
15 }
16 div div
17 {
18 background: blue;
19 float: left;
20 }
21 div div, img
22 {
23 height: 0.5in;
24 width: 0.5in;
25 }
26 img
27 {
28 background: orange;
29 display: block;
30 border: 0.1in solid white;
31 }
32 </style>
33 </head>
34 <body>
35 <p>Test passes if the orange box is to the right of the blue box, space needs to also separate the orange box from other boxes.</p>
36 <div id="div1">
37 <div></div>
38 <img alt="orange box" src="support/orange_box.png">
39 </div>
40 </body>
41 </html>