| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/st
rict.dtd"> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>CSS Test: Margin collapsing - bottom margin not collapse when cle
ared</title> | |
| 5 <script src="../../resources/ahem.js"></script> | |
| 6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/"> | |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-ma
rgins"> | |
| 8 <link rel="match" href="clearance-006-ref.htm"> | |
| 9 | |
| 10 <meta name="flags" content="ahem image"> | |
| 11 <meta name="assert" content="When a last sibling has clearance, its own
margins collapse and it collapsed its margins with a subsequent sibling, the las
t sibling does not collapse its bottom margin with its parent's bottom margin."> | |
| 12 <style type="text/css"> | |
| 13 div | |
| 14 { | |
| 15 font: 20px/1em Ahem; | |
| 16 width: 5em; | |
| 17 } | |
| 18 #div1 | |
| 19 { | |
| 20 background: url('support/margin-collapse-4em-space.png'); | |
| 21 height: 6em; | |
| 22 } | |
| 23 #div2 | |
| 24 { | |
| 25 margin-bottom: 2em; | |
| 26 } | |
| 27 #div3, #div5 | |
| 28 { | |
| 29 margin-bottom: 1em; | |
| 30 } | |
| 31 #div3, #div6 | |
| 32 { | |
| 33 background: green; | |
| 34 height: 1em; | |
| 35 } | |
| 36 #div4 | |
| 37 { | |
| 38 float: left; | |
| 39 height: 1em; | |
| 40 } | |
| 41 #div5 | |
| 42 { | |
| 43 clear: both; | |
| 44 margin-top: 1.5em; | |
| 45 } | |
| 46 </style> | |
| 47 </head> | |
| 48 <body> | |
| 49 <p>Test passes if there is no red.</p> | |
| 50 <div id="div1"> | |
| 51 <div id="div2"> | |
| 52 <div id="div3"></div> | |
| 53 <div id="div4"></div> | |
| 54 <div id="div5"></div> | |
| 55 </div> | |
| 56 <div id="div6"></div> | |
| 57 </div> | |
| 58 </body> | |
| 59 </html> | |
| OLD | NEW |