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: Right floated elements margins do not collapse</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="Right floating boxes never collapse with margins of adjacent boxes or other floats.">
9 <style type="text/css">
10 #div1
11 {
12 border: solid 5px black;
13 height: 232px;
14 width: 232px;
15 }
16 div div
17 {
18 background: blue;
19 height: 96px;
20 margin: 10px;
21 width: 96px;
22 }
23 #div2, #div4
24 {
25 float: right;
26 }
27 #div3
28 {
29 float: left;
30 }
31 </style>
32 </head>
33 <body>
34 <p>Test passes if there is twice as much space between the blue boxes as there is between the blue boxes and the black container edge.</p>
35 <div id="div1">
36 <div id="div2"></div>
37 <div></div>
38 <div id="div3"></div>
39 <div id="div4"></div>
40 </div>
41 </body>
42 </html>