Masonry is a layout plugin for jQuery. Think of it as the flip side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically then horizontally according to a grid. The result minimizes vertical gaps between elements of varying height, just like a mason fitting stones in a wall.
The primer in docs/index.html has all the documentation to get you started.
Code repository: github.com/desandro/masonry
View the docs live: desandro.com/demo/masonry/docs
Copyright (c) 2010 David DeSandro, licensed MIT