Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Test: stacked block-in-inlines collapse adjacent margins</title>
<link rel="match" href="multiple-block-in-inlines-margins-collapse-ref.html">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<meta name="assert" content="Three stacked block-in-inlines collapse their adjacent margins like flat block siblings.">
<style>
.container { width: 100px; font: 20px/1 Ahem; }
.a { width: 100px; height: 20px; margin-bottom: 40px; background: green; }
.b { width: 100px; height: 20px; margin-top: 30px; background: green; }
.c { width: 100px; height: 20px; margin-top: 50px; background: green; }
</style>
<p>Three green squares: 40px gap, then 50px gap.</p>
<div class="container">
<span><div class="a"></div><div class="b"></div><div class="c"></div></span>
</div>