Tagged: content shift, CSS
How do I prevent content shift for images on pages
Need css
tks
example: https://bestfortmyersrealestate.com/creekside-preserve/
There are many more pages like this
Hi daves1997,
I checked the page on Google’s Pagespeed Insight and it does not seem to have a Cumulative Layout Shift, I have posted the result link in private content.
Best regards,
Nikko
Hi daves1997,
I see, I think there’s a js code running that triggers that behavior.
Can you try adding this CSS code and see if it helps:
#top a:has(picture) {
display: inline !important;
}
if it does not help on other pages, please try to give links on it as well.
Best regards,
Nikko
Is that a global solution?
Hi daves1997,
Yes, it’s a global solution but it will only apply on links that has a picture on it.
If there’s other areas that it should not affect or other places it’s not working, then please provide links for it as well, then we can adjust the code to narrow it down.
Best regards,
Nikko