margin-collapse-130.xht (1302B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Margin Collapsing: basic overflow test</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-04-08 --> 7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/030.html" type="text/html"/> 8 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins"/> 9 <link rel="match" href="margin-collapse-130-ref.xht" /> 10 11 <meta name="flags" content="ahem" /> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 13 <style type="text/css"> 14 .test { border: solid; background: red; width: 5em; font: 1.25em/1em Ahem; } 15 .test .a { height: 0; margin: 0 0 1em 0; background: red; color: lime; } 16 .test .b { height: 1em; margin: 1em 0 0 0; background: lime; } 17 </style> 18 </head> 19 <body> 20 21 <p>Test passes if there is a small filled bright green rectangle with a black border and <strong>no red</strong>.</p> 22 <div class="test"> 23 <p class="a">XXXXX</p> 24 <p class="b"></p> 25 </div> 26 27 28 </body> 29 </html>