Masonry
Masonry is a lightweight and responsive grid layout framework that enables seamless arrangement of elements in a dynamic, Pinterest-style layout. It adapts automatically to screen sizes and content, making it ideal for portfolios, galleries, and dashboards.
Take a look here: https://github.com/triss90/masonry