| <!DOCTYPE html> |
| <title>CSS Test: block-in-inline margin-bottom collapses out through parent</title> |
| <link rel="help" href="https://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level"> |
| <link rel="help" href="https://www.w3.org/TR/CSS21/box.html#collapsing-margins"> |
| <link rel="match" href="block-in-inline-margin-collapses-with-parent-bottom-ref.html"> |
| <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> |
| <meta name="assert" content="A trailing block-in-inline's margin-bottom collapses with its parent's margin-bottom and propagates outside the parent."> |
| <style> |
| .parent { width: 100px; font: 20px/1 Ahem; } |
| .inner { width: 100px; height: 20px; margin-bottom: 40px; background: green; } |
| .sibling { width: 100px; height: 20px; background: green; } |
| </style> |
| <p>Two green squares separated by a 40px gap (margin propagates through parent).</p> |
| <div class="parent"> |
| <span><div class="inner"></div></span> |
| </div> |
| <div class="sibling"></div> |