blob: cb1e8125beab26614d5f482daef55f56fb86bfd5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>Margin Collapsing: in flow (position of collapsed-through element)</title>
<style type="text/css">
table { border-spacing: 0; font-size: 50px; border: solid; background: red; }
td { padding: 0; }
/* test */
.test { background: orange; width: 1em; }
.test .a { background: yellow; margin: 0 0 1em 0; height: 1em; }
.test .b { background: red; margin: 2em 0 0 0; }
.test .c { background: aqua; margin: 3em 0 0 0; height: 1em; }
.test .d { background: lime; margin: 0; position: absolute; height: 1em; width: 1em; }
/* control */
.control div { width: 1em; }
.control .a { border-top: 1em yellow solid; }
.control .b { border-top: 2em orange solid; }
.control .c { border-top: 1em lime solid; }
.control .d { border-top: 1em aqua solid; }
</style>
</head>
<body>
<p>The following two columns should be pixel perfect identical with no red visible.</p>
<table>
<tr>
<td class="test">
<div class="a"></div>
<div class="b">
<div class="d"></div>
</div>
<div class="c"></div>
</td>
<td class="control">
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
</td>
</tr>
</table>
<p>This test is meaningless if you don't pass <a href="006.html#">test 006</a>.</p>
</body>
</html>