| 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 lang="en" xmlns="http://www.w3.org/1999/xhtml"> |
| 3 <head> |
| 4 <title>CSS Test: Margin Collapsing: clear (simple)</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/marg
in-collapse/022.html" type="text/html"/> |
| 7 <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins"
/> |
| 8 <link rel="match" href="margin-collapse-121-ref.xht" /> |
| 9 |
| 10 <style type="text/css"> |
| 11 table, td { padding: 0; border-spacing: 0; vertical-align: top; } |
| 12 .comparator { border-spacing: 1em; } |
| 13 .test, .control { border: solid; background: red; } |
| 14 .test .container { display: block; margin: 0; width: 8em; background: lime; } |
| 15 .test .float { float: left; margin: 0; height: 4em; width: 4em; background: a
qua; } |
| 16 .test .clear { clear: left; display: block; border: 2em solid yellow; margin-
top: 1em; } |
| 17 .control .square { height: 4em; width: 4em; } |
| 18 .control .rectangle { height: 4em; width: 8em; } |
| 19 .control .lime { background: lime; } |
| 20 .control .aqua { background: aqua; } |
| 21 .control .yellow { background: yellow; } |
| 22 </style> |
| 23 </head> |
| 24 <body> |
| 25 <p>The following two squares should be identical.</p> |
| 26 <table class="comparator"> |
| 27 <tr> |
| 28 <td class="test"> |
| 29 <div class="container"> |
| 30 <div class="float"> </div> |
| 31 <div class="clear"> </div> |
| 32 </div> |
| 33 </td> |
| 34 <td class="control"> |
| 35 <table> |
| 36 <tr> |
| 37 <td class="square aqua"></td> |
| 38 <td class="square lime"></td> |
| 39 </tr> |
| 40 <tr> |
| 41 <td colspan="2" class="rectangle yellow"></td> |
| 42 </tr> |
| 43 </table> |
| 44 </td> |
| 45 </tr> |
| 46 </table> |
| 47 |
| 48 </body> |
| 49 </html> |
| OLD | NEW |