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">
4 <title>CSS Test: Margin Collapsing: in flow (simple)</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-08-15 -->
7 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/006.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-106-ref.xht" />
11 <meta name="flags" content="ahem" />
13 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
14 <style type="text/css">
15 table { border-spacing: 0; font: 50px/1 Ahem; border: solid 3px; background: red; }
18 .test { background: orange; }
19 .test div { margin: 1em 0; background: red; }
20 .test .a { color: yellow; }
21 .test .b { color: lime; }
23 .control div { width: 1em; }
24 .control .c { border-top: 1em orange solid; }
25 .control .a { border-top: 1em yellow solid; }
26 .control .b { border-top: 1em lime solid; }
28 .red { background: red; height: 1em; width: 10em; border: solid; }
29 .orange { border-top: 1em orange solid; }
33 <p>Test passes if there is a stack of 5 bands which are <strong>from top to bottom: orange, yellow, orange, lime, orange</strong> and with no red.</p>
37 <div class="a">X</div>
38 <div class="b">X</div>