margin-collapse-001

Margin collapsing - horizontal margins do not collapse

WeasyPrint

This browser

Flags
ahem
Assertion
Horizontal margins of element do not collapse.

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: Margin collapsing - horizontal 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/box.html#collapsing-margins">
 7         <meta name="flags" content="ahem">
 8         <meta name="assert" content="Horizontal margins of element do not collapse.">
 9         <style type="text/css">
10             div
11             {
12                 font: 20px/1em Ahem;
13             }
14             #test span
15             {
16                 color: blue;
17                 margin: 5em;
18             }
19             span
20             {
21                 color: white;
22             }
23             .color1
24             {
25                 color: orange;
26             }
27         </style>
28     </head>
29     <body>
30         <p>Test passes if the blue and orange boxes have the same horizontal spacing between them.</p>
31         <div id="test">
32             <span>XXXXX</span><span>XXXXX</span>
33         </div>
34         <div id="reference">
35             <span>XXXXX</span><span class="color1">XXXXX</span><span>XXXXXXXXXX</span><span class="color1">XXXXX</span>
36         </div>
37     </body>
38 </html>