This type of layout is called Masonry layout. Masonry is another grid layout but it will fill out the whitespace caused by the difference height of elements.
jQuery Masonry is one of jQuery plugin to create masonry layout.
Alternatively, you can use CSS3
columns. But for now jQuery based plugin is the best choice since there is compatibility issue with CSS3 column.