DrewDahlman / Mason

Mason.js for creating a perfect grid with jQuery.
http://masonjs.com/
MIT License
1.22k stars 183 forks source link

Mason for horizontal pages #13

Closed Mohsen-Khakbiz closed 11 years ago

Mohsen-Khakbiz commented 11 years ago

Hi again. I'm working on a project. Just for some experiences. It's a one page HTML template with Metro style. Like Windows 8. Mason and other layout plugins start ordering from left to right and when blocks rich to an specific width, the rest of blocks will go to the next row. But I have an specific height. And I want the plugin to start ordering from top to bottom and when blocks rich to that height, the rest of them go to the new column. Is it possible?

DrewDahlman commented 11 years ago

so this is an interesting problem and you may have to tweak some numbers but here's a quick fiddle I put together to illustrate a method for accomplishing this. http://jsfiddle.net/avQam/

The key is to set your column count, in this example I set it to 15 which gives a consistent height. This may be the solution you're looking for. Mason won't work with a set container height, but it will work with a width.

Hopefully this points you in the right direction!

Mohsen-Khakbiz commented 11 years ago

Thanks dude. This is good. But still I have to define a consistent width. I think I can go on with defined tile height and width, as I did before. It possibly works. Thanks again for helping :)