开发者

Arranging Divs to minimize spaces

开发者 https://www.devze.com 2023-03-09 17:22 出处:网络
Here\'s my problem: I have a group of divs which have varying amounts of content. They\'re floated l开发者_运维知识库eft and I want them to line up so there\'s no vertical space between them (apart fr

Here's my problem: I have a group of divs which have varying amounts of content. They're floated l开发者_运维知识库eft and I want them to line up so there's no vertical space between them (apart from the 10px margin I added.

here's an example on jsFiddle

it's a bit like this question but i couldn't quite follow the suggestions

1st, is this possible? CSS or jQuery? If you know how to do this, please explain it to me.

Thanks

Si-Fi


That´s not possible just with css, although I saw a sort of a solution using css3 columns but that´s not very cross-browser compatible.

You´ll have to use javascript, for example the Masonry jquery plugin.


Only one think what you can do here closer:

Click here

0

精彩评论

暂无评论...
验证码 换一张
取 消