block-formatting-contexts-007

Floats and box edges

WeasyPrint

This browser

Assertion
When there is no padding or margins on a floated child element the left outer edge of the child box will touch the left edge of the containing block.

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: Floats and box edges</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#block-formatting">
 7         <meta name="flags" content="">
 8         <meta name="assert" content="When there is no padding or margins on a floated child element the left outer edge of the child box will touch the left edge of the containing block.">
 9         <style type="text/css">
10             div
11             {
12                 height: 1in;
13             }
14             #div1
15             {
16                 border-left: solid 5px blue;
17             }
18             div div
19             {
20                 border-left: solid 5px orange;
21                 float: left;
22             }
23         </style>
24     </head>
25     <body>
26         <p>Test passes if there is no space between the blue and orange lines below.</p>
27         <div id="div1">
28             <div></div>
29         </div>
30     </body>
31 </html>