Is it possible to get the elements in the picture below to pack closer together somehow? Preferably using css, but javascript solutions are also welcome if that's not possible.

I'd like all the elements to be packed as closely together as possible to minimize the space they take up. The elements are currently spans with display:inline-block. I have tried to change to block with float:left, etc, but I always end up with inefficient rows of elements. That is the expected way, I'm just saying I'd like it to not be like that in this case :P

elements

Any brilliant minds able to help me out here?

有帮助吗?

解决方案

If you're searching for a more sophisticated solution then look into jQuery masonry plugin. Link here: jQuery masonry plugin

其他提示

Freetile is perfect and simple :) https://github.com/yconst/Freetile

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top