Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I built a masonry layout with only CSS and HTML 10 years ago. The site is actually still live. A scripting language is used to generate the HTML and CSS based on the dimensions of the images. But the masonry runs left to right not top to bottom.


How does that differ from just setting the images to be inline-blocks? Was it justified?


It's centered basically. All rows span the same width, but the heights of the rows can differ.


That's not going to be responsive which is today a must have.


It is actually responsive, I think because I used percentages in the CSS.


So it makes pictures larger / smaller based on the screen width?

Usually what is expected is that with narrower screen, you get fewer columns, pictures are still same-ish size. You also need to keep the order of the items (e.g. on a wider screen 1, 2, 3, 4 are all on one row, with a smaller screen 1 and 2 are on a row, then 3 and 4 on another row).


So no different than current design paradigms (which I loathe btw) which give you the exact same content regardless of viewport size.


Sure, but different from what the masonry design is meant to facilitate (check the linked demos). It's very useful esp. for a photo gallery kind of sites.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: