CSS2
Alas, as far as I know, this is not possible with pure CSS and HTML. I know there is a jQuery Masonry plugin that does this pretty well though.
CSS3
Using CSS3 Multi-column Layout Mode , you can achieve the layout of the question (although it will not have as many options as the aforementioned brickwork). IE support ranges from 10 to, and I think you might also need some browser prefixes. A version without a prefix will look something like this (on your container):
column-count: 3; column-gap: 10px; width: 480px;
Above was adapted from this blogpost , which refers to this demo (although there are others too ).
source share