JSFiddle - React, Tailwind, and code Playground
HTML
<div class="header">Header is normal div</div>
<div class="row">
<div class="column"><h1>Col 1 is float: left</h1></div>
<div class="column"><h1>Col 2 is float: left</h1></div>
</div>
<p>I want a 50 pixel margin between Header and the Cols, but the two margins don't collapse and I end up with 50 + = 100 pixel gap.</p>
CSS
.header {
background: silver;
height: 50px;
margin-bottom: 50px;
font-size: 24px;
}
.row {
margin-top: 50px;
}
.column {
float: left;
width: 50%;
}
h1 {
background: gold;
font-size: 24px;
}