JQuery freemasonry empty spaces

fiddle here - I need it to have no free space between the cubes, for example, on it. Just something like Windows 8 tiles or something else. And I would like to stay with the masonry, without the isotope, because the masonry is licensed by MIT. Is it possible? I messed up the masonry settings a bit, but it didn’t help, so I cleaned it up on the violin.

$("#container").masonry(); 
+4
source share
1 answer

You want to change the default column width to 1px,

 /* JS */ $("#container").masonry({ columnWidth: 1, }); 

otherwise, the default is the width of the first element.

Next you must delete the fields

 /* CSS */ .box-item { margin: 0px; } 

and it should work.

Here is a script of what I think you are looking for http://jsfiddle.net/xKjUv/38/

+6
source

Source: https://habr.com/ru/post/1443003/


All Articles