Masonry is a dynamic grid layout library. Think of it as the flip-side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically, positioning each element in the next open spot in the grid. The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wall.
If you are cool with the command line, install Masonry as a Bower package:
bower install masonry
Masonry is licensed MIT. Have at it.
Copyright (c) 2013 David DeSandro