Support » Theme: Baskerville » post-container div alignment issue

  • Resolved kunalashar25

    (@kunalashar25)


    post-container is misaligned with initial page load but works fine when refreshed again. The same issue is found when we search using search bar. Cards will be not be aligned properly.Screenshot

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @kunalashar25,

    That’s odd – I did a refresh of the Masonry code in version 2.0.0, and since then, I haven’t run into any issues with post container misalignment on my development installation or the demo site, but I can replicate the issue on your site.

    Are you running a lazy loading plugin for your images?

    — Anders

    Are you running a lazy loading plugin for your images?

    Yes, that was the issue, I disabled it and now it’s working fine.

    Do you know why lazy loading is it causing such an issue?

    Theme Author Anders Norén

    (@anlino)

    @kunalashar25 Baskerville uses a solution called ImagesLoaded which triggers when all images within a certain set of elements have been loaded. It’s used to determine when the post grid is ready to be arranged into the grid.

    When using lazy loading, ImagesLoaded can’t detect any images, so it believes all images have already been loaded and gives the green light for arranging the grid. When the images are loaded by the lazy loading plugin and inserted into the previews, the size of the previews change, and the grid becomes misaligned. It’s a tricky issue to get around.

    @anlino I see. Thank you! It’s a great theme!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.