1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
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
;}
21 background-color: lime
;
22 border-top: black solid
1px;
28 background-color: blue
;
34 #clear-left {clear: left
;}
38 background-color: aqua
;
45 background-color: yellow
;
51 background-color: red
;
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>
87 <div id=
"next-yellow"></div>
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.
95 <div id=
"ref1" class=
"ref-overlapped-red"></div>
96 <div id=
"ref2" class=
"ref-overlapped-red"></div>