How can we achieve the fixed width and variable height in a grid layout, exactly like http://www.pinterest.com homepage layout. I think they are using Javascript. just wondering whether there are other approaches. simply using the float:left will not work. thanks for any help.
How can we achieve the fixed width and variable height in a grid layout,
Share
The easiest option is to use the jQuery Masonry plugin.
If you want to do it via CSS only, you have to float large, equal width columns and then add your variable height elements within them.
And the CSS would look like so: