There are "gaps" between rows in my masonry cards

- 1 answer

Ad

I have created this site: https://jsfiddle.net/1pvk13o8/

I am using jquery masonry, all seems to work great but there are gaps or holes of white space between some of the rows , any help? I want everything to be aligned as it should

All the files together are in the jsfiddle (really short amount of code)

JS:

< script type = "text/javascript" >
  $(document).ready(function() {
    $('.card').masonry();
  }) < /script>

Thanks

Ad

Answer

Ad

Your Script not working. Use code like this:

$('.videos').masonry({
  itemSelector: '.card'
});

CSS

.card  {
  float: left;
   width: 300px;
  margin:10px;
}

Also need to include Jquery file if you didn't.

Ad
source: stackoverflow.com
Ad