Is this Link possible without javascript?
I’m trying to learn css and floating layouts.
I’ve searched on the forums and people’s links to this site, and even if this is looks like a good solution I would like to broaden my skills in css and html.
Is this Link possible without javascript ? I’m trying to learn css and floating
Share
Using
CSS3 Columnsyou can easily achieve the same result on modern browser:Example jsbin: http://jsbin.com/ivumoq/1/edit
relevant CSS
You may also define the number of columns according to a specific mediaquery. E.g. if you wanto to display 4 columns when the viewport is larger that >
960pxSo you could emulate the reflow of masonry on browser resize.
Example with mediaqueries: http://jsbin.com/ivumoq/2/edit
Otherwise, using float you need to define three floated containers (as three independent columns) and place approx.ly 1/3 of the images on each container.