Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I float articles in two columns?

I have this problem. I am building a social website and I have to create posts in two columns. The parent container is a section, instead the elements "post" are articles that have as their style float: left. How do I let slip to the post of the empty space that creates under those shorter?

enter image description here

like image 714
iulianrusu Avatar asked Jan 26 '26 13:01

iulianrusu


1 Answers

there is no good solution in css yet. this is typically called a masonry or pinterest layout. use jquery.

try... http://masonry.desandro.com/

or google 'masonry layout plugin'

like image 146
superUntitled Avatar answered Jan 29 '26 04:01

superUntitled