How to Fix Cumulative Layout Shift (CLS)
Cumulative Layout Shift (CLS) measures how much your page jumps around while it loads. To fix it, find the elements that move (usually images, fonts, banners, embeds and ads) and reserve their space before they appear. A score of 0.1 or lower is considered good.
Have you ever gone to tap a button and the page jumped, so you hit something else? That is layout shift. Google measures it as Cumulative Layout Shift (CLS) and counts it as one of the three Core Web Vitals. This page explains what causes it, how to find the culprits for free, and how to fix them, even if you are not a developer.
What the problem is and what people see
CLS is a score for unexpected movement. Each time a visible element changes position without the visitor asking for it, the page gets a shift score based on how big the element is and how far it moved. CLS adds up the worst burst of those shifts during the visit.
Google's thresholds, measured for the 75th percentile of real visits, are:
| Score | Rating |
|---|---|
| 0.1 or lower | Good |
| Above 0.1 up to 0.25 | Needs improvement |
| Above 0.25 | Poor |
What visitors notice:
- Text jumps down because an image above it loads late.
- A cookie bar or promo banner pushes the whole page down after it appears.
- Text changes size or font a moment after it shows.
- A video, map or ad box pops in and shoves content aside.
- Buttons move just as someone is about to tap them.
Shifts that happen right after a click or tap (for example, opening a menu) are expected by the browser and mostly do not count. The ones that hurt are the surprises.
Why it matters
Core Web Vitals are part of Google's page experience signals, so a poor CLS can work against you in search, though it is one signal among many and content relevance still matters more. The bigger cost is usually human: visitors mis-tap, lose their place while reading, or tap the wrong button in a checkout. That erodes trust and sales, especially on phones where screens are small and a jump of a few lines moves everything.
How to check if your site has it
These are free:
- PageSpeed Insights (pagespeed.web.dev): enter a page address. The top section shows real visitor data (if Google has enough) and the lower section shows a lab test. Look at the CLS number and the diagnostic called "Avoid large layout shifts", which lists the elements that moved.
- Google Search Console: open the Core Web Vitals report to see groups of pages marked Poor or Needs improvement for mobile and desktop. It uses real visitor data collected over time.
- Chrome DevTools: open the page, press F12, go to the Performance panel, record a page load, and look for the Layout Shifts row. Clicking a shift shows which element moved.
Test your most important pages: home page, a product or service page, and a blog post. Test on mobile too, since that is where shifts are usually worse. Lab results and real visitor data can differ, because real visitors have slower connections and different screens.
If you want this checked for you, week 4 of SiteMonday covers speed and Core Web Vitals and ends with a written report and a ranked fix list.
How to fix it
The idea is always the same: tell the browser how much room something needs before it arrives.
- Give images and videos a size. Add
widthandheightattributes to every<img>tag, matching the image's real proportions. With CSS such asimg { max-width: 100%; height: auto; }the image still scales, but the browser keeps the right amount of space. For videos and embeds you can use the CSSaspect-ratioproperty, for exampleaspect-ratio: 16 / 9;. - Reserve space for ads, embeds and iframes. Put them in a container with a fixed
min-height(or an aspect ratio) so the page does not move when the content loads. This applies to maps, social feeds, review widgets and booking forms. - Do not insert content above what people are already reading. Banners, cookie notices and "sale" bars should either have their space reserved from the start, or appear as an overlay at the top or bottom of the screen (
position: fixed) rather than pushing the page down. - Tame web fonts. When a custom font swaps in, text can change width and cause reflow. Host the font files yourself if you can, preload your main font, use
font-display: swaporoptional, and choose a fallback font of similar size. Fewer font weights also means fewer swaps. - Animate with `transform`, not layout. Animations that change
height,topormargincause shifts. Usingtransformandopacitydoes not. - Avoid late lazy content in the first screen. Do not lazy load the main image at the very top of the page, and do not inject sliders or popups that resize as scripts finish.
Fixing it on common platforms
Menu names change between versions and themes, so treat these as pointers.
- WordPress: modern WordPress adds image sizes automatically for images inserted through the editor, but older themes, page builders and hand-written HTML often skip them. Check your theme's header banners, logo, sliders and ad areas. See the WordPress guide.
- Shopify: theme sections such as announcement bars, product galleries and review apps are common causes. Check apps that inject banners or widgets. See the Shopify guide.
- Wix, Squarespace and Webflow: you have less control over the underlying code. Look for image settings, banner or popup settings, and custom fonts, and set fixed heights for sections with embeds.
- Next.js and similar frameworks: the built in image and font components are designed to reserve space, so make sure you are using them instead of plain tags. See the Next.js guide.
If a third party app or widget is the cause and offers no size setting, you may need to wrap it in a fixed height container or ask your developer for help.
How to confirm the fix worked
- Run PageSpeed Insights on the same page again and compare the lab CLS and the "Avoid large layout shifts" list.
- Reload the page on a phone, with the browser cache cleared, and watch it load. If nothing jumps, you are on the right track.
- Wait for real data. The real visitor numbers in PageSpeed Insights and Search Console are based on a rolling window of about 28 days, so improvements show up gradually, not overnight.
- In Search Console, use "Validate fix" on the Core Web Vitals issue if it is listed.
How to stop it coming back
Most CLS returns because something new was added: a new banner, a new plugin, a bigger hero image, or a new font. Build a few habits:
- Always upload images with sizes set, and use the editor's normal image block rather than pasting raw code.
- Test the page on mobile after adding any popup, widget, embed or ad.
- Keep the number of third party scripts small, and review them now and then.
- Recheck your key pages after theme or plugin updates.
- Look at the Core Web Vitals report in Search Console every few weeks.
A yearly review also helps catch drift. SiteMonday runs speed and Core Web Vitals checks as part of its calendar, so the same checks come around again without you having to remember. Fixing the problems it finds is still up to you or your developer.
If your CLS is poor, start with the biggest mover in the PageSpeed list, fix that one thing, and test again. Often one or two changes (usually image sizes and a banner) are enough to move a page from Poor to Good.
Step by step for your platform
- High Cumulative Layout Shift (CLS) on WordPress
- High Cumulative Layout Shift (CLS) on Shopify
- High Cumulative Layout Shift (CLS) on Wix
- High Cumulative Layout Shift (CLS) on Squarespace
- High Cumulative Layout Shift (CLS) on Webflow
- High Cumulative Layout Shift (CLS) on Elementor
- High Cumulative Layout Shift (CLS) on Next.js
Questions
What is a good CLS score?
A CLS of 0.1 or lower is considered good, 0.1 to 0.25 needs improvement, and above 0.25 is poor. Google judges this at the 75th percentile of real visits.
Why is my CLS different in PageSpeed Insights lab and field data?
Lab data is one simulated load, while field data comes from real visitors over about 28 days, with different devices and connections. Real visitors also scroll and interact, which can reveal shifts the lab test misses.
Do cookie banners cause layout shift?
Yes, if they appear late and push the page down. Make the banner an overlay (fixed position) or reserve its space from the start so nothing moves.
Will fixing CLS improve my Google ranking?
It can help, since Core Web Vitals are a page experience signal, but it is one factor among many. It will almost certainly improve how the site feels for visitors.
How long until the fix shows in Search Console?
Search Console uses a rolling window of about 28 days of real visitor data, so expect to wait a few weeks to see the full effect.
Can I fix CLS without a developer?
Often yes for simple causes like image sizes, banners and fonts, using your theme or site builder settings. Third party widgets and custom code may need a developer.