1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html lang="en">
3 <head>
4 <title>CSS Test: Margin Collapsing: floats</title>
5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/block/margin-collapse/004.html" type="text/html">
7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">
8 <style type="text/css">
9 div.test { background: green; float: left; }
10 div.test div { background: red; margin: 5em 2.5em; }
11 div.control { height: 5em; width: 5em; margin: 0 0 -5em 0; background: red; }
12 </style>
13 </head>
14 <body>
15 <p>This page should have one square green block and no red.</p>
16 <div class="control"></div>
17 <div class="test">
18 <div></div>
19 </div>
20
21
22 </body>
23 </html>