Community forum for knowledge and support

Updated 3 months ago

Solving cumulative layout shift (cls) in pagespeed insights

At a glance

A community member is struggling with Cumulative Layout Shift (CLS) issues in PageSpeed Insights and asks if anyone else has dealt with this. They note that the divs on their page don't have set heights or widths, which they think may be causing the CLS issues. Other community members suggest trying to remove any fade-in animations, as they may be impacting CLS, and checking if the CSS file is taking longer to load, which could also cause layout shifts. One community member suggests that the issue may be with the "box that holds the space" not having a fixed value, and that setting a height and width might solve the problem, though they acknowledge this may not be the ideal solution. There is no explicitly marked answer in the comments.

Useful resources

Has anyone dealt with solving CLS in PageSpeed Insights?

Can't seem to grasp my head around it πŸ€” the divs don't have set heights or widths, so won't they always be "pushing" the content around to CLS despair?

A
R
6 comments

Got a link to the page?

Thanks for answering, , here's a link to the page.

https://www.greenmonkeyfilm.com/

Ddi you try removing the fade-in animations on the text/link items? As far as I know css transitions should not impact the CLS but it's worth the try?

I'm like you, I don't think animations have any particular effect on CLS.

It's the box that holds the space that hasn't got a fixed value from the start that has CLS scratching its head.

If I'd give it a height and width, I think it's a problem solved.

But the align-center, margin-top isn't really supposed to have height and width 🀷

But! I'll try it 😊✌

Ye indeed, wel another thing could be because of the video and tracking scripts, the css file takes longer to load thus making it jump when its get loaded.

That was interesting idea! I'll take that with me into my investigation πŸ™‚

Add a reply
Sign up and join the conversation on Slack