I have multiple divs with equal widths but varying heights that I need to fit together tightly.
When I set them to float left, they don't align vertically but instead line up at the bottom of the row above.
Even with the example below, I want to eliminate the white space. Any suggestions on how to achieve this? I am constrained to this format due to the externally delivered content.
Thanks!
<div style="width:500px;">
<div style="display:block; width:250px; height:100px; background-color:#333; float:left;"></div>
<div style="display:block; width:250px; height:180px; background-color:#888; float:left;"></div>
<div style="display:block; width:250px; height:130px; background-color:#354689; float:left;"></div>
<div style="display:block; width:250px; height:90px; background-color:#181; float:left;"></div>
</div>