| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/x
html1/DTD/xhtml1-strict.dtd"> |
| 2 |
| 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 |
| 5 <head> |
| 6 |
| 7 <title>CSS Test: Margin collapsing with clearance - Margins collapsing of an e
lement's top margin with its first in-flow child should not be affected by clear
and clearance</title> |
| 8 |
| 9 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins"
/> |
| 10 <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserB
ugsSection/css21testsuite/" /> |
| 11 <link rel="author" title="Bruno Fassino" href="fassino[at]gmail.com" /> |
| 12 <link rel="match" href="margin-collapse-clear-015-ref.xht" /> |
| 13 |
| 14 <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 s
hould collapse normally." name="assert" /> |
| 15 <meta content="" name="flags" /> |
| 16 |
| 17 <style type="text/css"><![CDATA[ |
| 18 #rel-pos-wrapper {position: relative;} |
| 19 |
| 20 #parent-lime |
| 21 { |
| 22 background-color: lime; |
| 23 border-top: black solid 1px; |
| 24 width: 50%; |
| 25 } |
| 26 |
| 27 #float-left-blue |
| 28 { |
| 29 background-color: blue; |
| 30 float: left; |
| 31 height: 100px; |
| 32 width: 100px; |
| 33 } |
| 34 |
| 35 #clear-left {clear: left;} |
| 36 |
| 37 #clear-left > div |
| 38 { |
| 39 background-color: aqua; |
| 40 height: 60px; |
| 41 margin-top: 140px; |
| 42 } |
| 43 |
| 44 #next-yellow |
| 45 { |
| 46 background-color: yellow; |
| 47 height: 100px; |
| 48 } |
| 49 |
| 50 .ref-overlapped-red |
| 51 { |
| 52 background-color: red; |
| 53 left: 0; |
| 54 position: absolute; |
| 55 z-index: -1; |
| 56 } |
| 57 |
| 58 #ref1 |
| 59 { |
| 60 height: 200px; |
| 61 top: 1px; |
| 62 width: 50%; |
| 63 } |
| 64 |
| 65 #ref2 |
| 66 { |
| 67 height: 100px; |
| 68 top: 201px; |
| 69 width: 100%; |
| 70 } |
| 71 ]]></style> |
| 72 |
| 73 </head> |
| 74 |
| 75 <body> |
| 76 |
| 77 <p>Test passes if there is <strong>no red</strong>.</p> |
| 78 |
| 79 <div id="rel-pos-wrapper"> |
| 80 |
| 81 <div id="parent-lime"> |
| 82 <div id="float-left-blue"></div> |
| 83 <div id="clear-left"> |
| 84 <div></div> |
| 85 </div> |
| 86 </div> |
| 87 |
| 88 <div id="next-yellow"></div> |
| 89 |
| 90 <!-- |
| 91 #ref1 and #ref2 boxes create a sort of 'reference rendering' |
| 92 where #ref1 should be covered, overlapped by #parent-lime |
| 93 while #ref2 should be covered, overlapped by #next-yellow. |
| 94 --> |
| 95 |
| 96 <div id="ref1" class="ref-overlapped-red"></div> |
| 97 <div id="ref2" class="ref-overlapped-red"></div> |
| 98 |
| 99 </div> |
| 100 |
| 101 </body> |
| 102 </html> |
| OLD | NEW |