adjacent-floats-001

Multiple floated boxes adjacent to each other

WeasyPrint

This browser

Assertion
Floated boxes are allowed to be next to each other.

Source

 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: Multiple floated boxes adjacent to each other</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 boxes are allowed to be next to each other.">
 9         <style type="text/css">
10             div div
11             {
12                 float: left;
13                 height: 1in;
14                 width: 1in;
15             }
16             #div1
17             {
18                 background-color: orange;
19             }
20             #div2
21             {
22                 background-color: blue;
23             }
24         </style>
25     </head>
26     <body>
27         <p>Test passes if the orange box is to the left of the blue box and the boxes top edges are aligned.</p>
28         <div>
29            <div id="div1"></div>
30            <div id="div2"></div>
31         </div>
32     </body>
33 </html>