block-formatting-contexts-006

No padding and margin, right edges touch

WeasyPrint

This browser

Assertion
When there is no padding or margins on elements the right outer edge of the child box will touch the right 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: No padding and margin, right edges touch</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 elements the right outer edge of the child box will touch the right edge of the containing block.">
 9         <style type="text/css">
10             div
11             {
12                 height: 1in;
13             }
14             #div1
15             {
16                 border-right: solid 5px blue;
17                 width: 1in;
18             }
19             div div
20             {
21                 border-right: solid 5px orange;
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>