CSS 2.1 failure: margin-collapse-clear-012 fails
[WebKit-https.git] / LayoutTests / css2.1 / 20110323 / margin-collapse-027.htm
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 - bottom margin not collapse when cleared</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         <link rel="match" href="clearance-006-ref.htm">
8
9         <meta name="flags" content="ahem image">
10         <meta name="assert" content="When a last sibling has clearance, its own margins collapse and it collapsed its margins with a subsequent sibling, the last sibling does not collapse its bottom margin with its parent's bottom margin.">
11         <style type="text/css">
12             div
13             {
14                 font: 20px/1em Ahem;
15                 width: 5em;
16             }
17             #div1
18             {
19                 background: url('support/margin-collapse-4em-space.png');
20                 height: 6em;
21             }
22             #div2
23             {
24                 margin-bottom: 2em;
25             }
26             #div3, #div5
27             {
28                 margin-bottom: 1em;
29             }
30             #div3, #div6
31             {
32                 background: green;
33                 height: 1em;
34             }
35             #div4
36             {
37                 float: left;
38                 height: 1em;
39             }
40             #div5
41             {
42                 clear: both;
43                 margin-top: 1.5em;
44             }
45         </style>
46     </head>
47     <body>
48         <p>Test passes if there is no red.</p>
49         <div id="div1">
50             <div id="div2">
51                 <div id="div3"></div>
52                 <div id="div4"></div>
53                 <div id="div5"></div>
54             </div>
55             <div id="div6"></div>
56         </div>
57     </body>
58 </html>