| 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 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>CSS Test: Margin collapsing - in-flow block-level margin adjoinin
g child's margin</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-ma
rgins" /> |
| 7 <link rel="match" href="margin-collapse-024-ref.xht" /> |
| 8 |
| 9 <meta name="flags" content="ahem image" /> |
| 10 <meta name="assert" content="When an in-flow block-level element (#div3)
is adjoining its in-flow block-level child's top margin and the child has no to
p border, no top padding or no clearance applied to it, then such top margins co
llapse." /> |
| 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-2em-space.png'); |
| 20 height: 4em; |
| 21 } |
| 22 #div2, #div4 |
| 23 { |
| 24 background: green; |
| 25 height: 1em; |
| 26 } |
| 27 #div3 |
| 28 { |
| 29 background: red; |
| 30 } |
| 31 #div3, #div4 |
| 32 { |
| 33 margin-top: 2em; |
| 34 } |
| 35 </style> |
| 36 </head> |
| 37 <body> |
| 38 <p>Test passes if there is no red.</p> |
| 39 <div id="div1"> |
| 40 <div id="div2"></div> |
| 41 <div id="div3"> |
| 42 <div id="div4"></div> |
| 43 </div> |
| 44 </div> |
| 45 </body> |
| 46 </html> |
| OLD | NEW |