Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / css2.1 / 20110323 / margin-collapse-clear-015.htm
blobc11831fba60cc3a3261c4f8e57fd90bdf585fa5f
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
4 <head>
6 <title>CSS Test: Margin collapsing with clearance - Margins collapsing of an element's top margin with its first in-flow child should not be affected by clear and clearance</title>
8 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
9 <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
10 <link rel="author" title="Bruno Fassino" href="fassino[at]gmail.com">
11 <link rel="match" href="margin-collapse-clear-015-ref.htm">
13 <meta content="When an element with clear set to it (to other than 'none') has a first in-flow child and their top margins are adjoining, then these margins should collapse normally." name="assert">
14 <meta content="" name="flags">
16 <style type="text/css">
17 #rel-pos-wrapper {position: relative;}
19 #parent-lime
21 background-color: lime;
22 border-top: black solid 1px;
23 width: 50%;
26 #float-left-blue
28 background-color: blue;
29 float: left;
30 height: 100px;
31 width: 100px;
34 #clear-left {clear: left;}
36 #clear-left > div
38 background-color: aqua;
39 height: 60px;
40 margin-top: 140px;
43 #next-yellow
45 background-color: yellow;
46 height: 100px;
49 .ref-overlapped-red
51 background-color: red;
52 left: 0;
53 position: absolute;
54 z-index: -1;
57 #ref1
59 height: 200px;
60 top: 1px;
61 width: 50%;
64 #ref2
66 height: 100px;
67 top: 201px;
68 width: 100%;
70 </style>
72 </head>
74 <body>
76 <p>Test passes if there is <strong>no red</strong>.</p>
78 <div id="rel-pos-wrapper">
80 <div id="parent-lime">
81 <div id="float-left-blue"></div>
82 <div id="clear-left">
83 <div></div>
84 </div>
85 </div>
87 <div id="next-yellow"></div>
89 <!--
90 #ref1 and #ref2 boxes create a sort of 'reference rendering'
91 where #ref1 should be covered, overlapped by #parent-lime
92 while #ref2 should be covered, overlapped by #next-yellow.
93 -->
95 <div id="ref1" class="ref-overlapped-red"></div>
96 <div id="ref2" class="ref-overlapped-red"></div>
98 </div>
100 </body>
101 </html>