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 float with earlier floated siblings</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="A right floated box is to left of earlier floated boxes or below the earlier floated element's bottom edge.">
9 <style type="text/css">
10 div
11 {
12 border-top: solid 5px black;
13 width: 3in;
14 }
15 span
16 {
17 float: right;
18 height: 1in;
19 width: 1in;
20 }
21 #span1
22 {
23 background-color: orange;
24 }
25 #span2
26 {
27 background-color: blue;
28 }
29 </style>
30 </head>
31 <body>
32 <p>Test passes if the orange box is to the right of the blue box and the top edges of both boxes touch the black line.</p>
33 <div>
34 <span id="span1"></span>
35 <span id="span2"></span>
36 </div>
37 </body>
38 </html>