I'm writing a a layout in CSS and HTML where I want the expected layout to be rendered out from left to right, top to bottom like this:
Each box has different height but the same width. I don't know how many boxes there are, it can vary from 2 to 20. I've tried float: left, but then you will get empty space depending on the size of the boxes. I've also tried column in CSS3, but It behaves very randomly, both on browser type, number of boxes and the size of the boxes. Does anyone know a smart trick to make it look like this, and preferably without the use of Javascript.