Title: post-container div alignment issue
Last modified: April 28, 2020

---

# post-container div alignment issue

 *  Resolved [kunalashar25](https://wordpress.org/support/users/kunalashar25/)
 * (@kunalashar25)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/post-container-div-alignment-issue/)
 * 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](https://bit.ly/35b9VtF)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpost-container-div-alignment-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Theme Author [Anders Norén](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/post-container-div-alignment-issue/#post-12741911)
 * Hi [@kunalashar25](https://wordpress.org/support/users/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
 *  Thread Starter [kunalashar25](https://wordpress.org/support/users/kunalashar25/)
 * (@kunalashar25)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/post-container-div-alignment-issue/#post-12741958)
 * `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](https://wordpress.org/support/users/anlino/)
 * (@anlino)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/post-container-div-alignment-issue/#post-12742069)
 * [@kunalashar25](https://wordpress.org/support/users/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.
 *  Thread Starter [kunalashar25](https://wordpress.org/support/users/kunalashar25/)
 * (@kunalashar25)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/post-container-div-alignment-issue/#post-12742093)
 * [@anlino](https://wordpress.org/support/users/anlino/) I see. Thank you! It’s
   a great theme!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘post-container div alignment issue’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/baskerville/2.3.1/screenshot.jpg)
 * Baskerville
 * [Support Threads](https://wordpress.org/support/theme/baskerville/)
 * [Active Topics](https://wordpress.org/support/theme/baskerville/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/baskerville/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/baskerville/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [kunalashar25](https://wordpress.org/support/users/kunalashar25/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/post-container-div-alignment-issue/#post-12742093)
 * Status: resolved