Site logo

Archived topic

Displaying posts in masonry grid format causes overlap

3 replies · Started by victor on June 1, 2021

Viewing posts 1–4 of 4

Happens when first post is featured. Any idea on how to fix this? Cache doesn't seem to be the issue. Issue is present in all browsers on both desktop and mobile viewports. Changing viewports then going back fixes it until homepage is reloaded.

edited

Update, it looks like anything in masonry grid causes overlap, this seems like a huge bug.

Update 2: It seems this issue may have been causes by lazy loading from litespeed cache plugin

Hi Victor,

Update 2: It seems this issue may have been causes by lazy loading from litespeed cache plugin

That makes sense. The masonry script calculates positioning based on the size of the element. It gets the calculation wrong because if some images are lazyloaded, the calculations based on the size of the element will be off because lazyloaded images are 0 in height when they are not within viewport.

That said, you'll definitely have to pick between keeping lazyload but turning masonry off or the other way around.

This archived topic is closed to new replies.