blob: 5fddca773cbc03807686ad0ea1770433b9ed614e [file] [log] [blame]
<!DOCTYPE html>
| Bottom margin of a last in-flow child and bottom margin of its parent margins
| are not adjoining if the parent has computed height other than "auto",
| and thus they do not collapse.
.outer-green {
background-color: #00e676;
margin-bottom: 10px;
height: 100px; /* This line prevents margin collapsing. */
.inner-green {
background-color: #00c853;
height: 100px;
margin-bottom: 100px;
width: 100px;
.outer-blue {
background-color: #03a9f4;
height: 100px;
width: 100px;
<div class="outer-green">
<div class="inner-green"></div>
<div class="outer-blue"></div>