- This topic has 10 replies, 2 voices, and was last updated 2 months, 1 week ago by David.
May 26, 2022 at 1:18 am #2233081Nicole
My site is showing a cumulative layout shift on a desktop from the navigation.
What can I do to solve this?May 26, 2022 at 3:29 am #2233172DavidStaffCustomer Support
there could be a few things at play here.
But to begin – the Logo image has no
heightattributes so the browser cannot reserve space for it which causes CLS.
Not sure if this is due to the Pinterest code attached to it.
Try excluding the logo from pinterest, the plugins generally have an option to exclude images with a specific class and you can use:
is-logo-imageMay 26, 2022 at 5:00 am #2233271Nicole
Thanks. I disabled the pin button plugin totally but it doesn’t seem to have solved the problem.
Any other suggestions?May 26, 2022 at 5:52 am #2233315DavidStaffCustomer SupportMay 26, 2022 at 5:55 am #2233317Nicole
That happened to me too. I think I have cleared the cache about 20 times already from WP rockets and on host.
I’ll disable WP-rocket until we sort this out.
Thanks again.May 26, 2022 at 7:07 am #2233402DavidStaffCustomer SupportMay 27, 2022 at 4:02 am #2235009Nicole
Thanks, but it looks like the problem just moved to mobile 🙂
Initially, the desktop had a CLS problem and the mobile was ok.
I removed the Pinterest plugin that you mentioned was causing issues but then the desktop has no CLS and the mobile suddenly has a shift.
What went wrong?May 27, 2022 at 4:57 am #2235082DavidStaffCustomer Support
If i test the site with WP Rocket disabled by adding the
?nowprocketquery string to the URL, then CLS is almost
0on mobile. So there is something in the WP Rocket settings thats causing the issue.
Aside from deselecting some of its options, most likely CSS optimization, to find out the culprit you may want to check with WP Rocket support so see if they can spot the issue.May 27, 2022 at 6:28 am #2235169Nicole
Ok, thanks so much for your help!May 27, 2022 at 7:00 am #2235205Nicole
I am just adding a note here in case anyone has the same problem.
Once I disabled “optimize CSS delivery” there was no CLS shift anymore.
Thanks for pointing me in the right direction.May 27, 2022 at 7:54 am #2235385
- You must be logged in to reply to this topic.