Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masonry Tiles Out Of Order #899

Closed
Johnnh opened this issue Sep 16, 2016 · 1 comment
Closed

Masonry Tiles Out Of Order #899

Johnnh opened this issue Sep 16, 2016 · 1 comment

Comments

@Johnnh
Copy link

Johnnh commented Sep 16, 2016

First up, great product. Looks amazing on a website.

I have a website at the below url that uses masonry.

http://www.butterscotchdesign.com/work/

The 8th image 'Deborah Goodchild - Sketched tall house and tree' unexpectedly swaps it's order with the Garden Gent image and breaks the expected layout as you resize the window.

I can reproduce this consistently across all browsers and am wondering what I am doing wrong?

The set up is as follows:

$(document).ready(function() {

    var $grid = $('.grid').masonry({

      // set itemSelector so .grid-sizer is not used in layout
      itemSelector: '.grid-item',
      // use element for option
      columnWidth: '.grid-sizer',
      transitionDuration: 0,
      percentPosition: true

    })

    $grid.imagesLoaded().progress( function() {

        $grid.masonry('layout');

    });

});

Any ideas would be greatly appreciated.

Thanks for your time and help with this.

@desandro
Copy link
Owner

Thanks for reporting this issue. This is well known issue with pixel rounding differences between JS and CSS. See possible solution in #811. Closing here, keep discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants