Meregate.com
Saturday, December 5, 2026
Home › SEO › How to Fix Cumulative Layout Shift: A Simple Guide (2026)

How to Fix Cumulative Layout Shift: A Simple Guide (2026)

How to Fix Cumulative Layout Shift: A Simple Guide (2026)

Last updated: December 2026

Cumulative layout shift is the reason a page jumps just as you reach for a button. You open a page, the text looks ready, you move to tap a link, and the whole page shifts down. You tap the wrong thing instead. That jump has a name, a score, and a fix. This guide shows you how to fix cumulative layout shift step by step.

Layout shift is one of the three Core Web Vitals Google uses to judge page experience. The other two are loading speed and responsiveness. The loading metric is called largest contentful paint, and it measures how fast the biggest thing on the page shows up. This article covers the stability metric: how to stop the page from moving.

On this page

What is cumulative layout shift?

Cumulative layout shift, or CLS, is a score for how much a page moves while it loads. A layout shift happens when a visible element changes its start position between two frames. In plain words: something on the page was in one place, then it moved, and you did not ask it to move.

Each shift gets a score. The score is the impact fraction times the distance fraction. The impact fraction is how much of the screen the moving element covers. The distance fraction is how far it moved. A big element moving a short distance can score worse than a small element moving far. The page score is the worst burst of shifts during the visit.

CLS scoreWhat it means
0.1 or lessGood
0.1 to 0.25Needs improvement
More than 0.25Poor

Google measures the score on real visits, at the 75th percentile, over a rolling 28-day window. Mobile and desktop are counted separately. A shift that happens within 500 milliseconds of you clicking or tapping does not count, because you caused it. A page that jumps on its own is what counts against you.

CLS is not a speed problem. It is a space problem. The page jumps because something arrived later than the layout assumed: an image with no reserved box, a font that changed the text size, a banner that pushed the content down. The fix is not to load faster. The fix is to reserve the right space before the late thing arrives.

How to find what causes the shift

A business desk with a laptop, coffee, and a water glass
Source: Pexels

Do not guess. Find the element that moves first, then fix that one thing.

1. Run the page through PageSpeed Insights. The field data at the top is what Google actually uses. Scroll to the diagnostics and look for “Avoid large layout shifts.” It names the elements that shifted, biggest first. That list alone often tells you the whole fix.

2. Record a load in Chrome DevTools. Open the Performance panel, turn on network throttling, and reload the page. The recording flags every layout shift event. Click one and Chrome highlights which element moved and where it came from. This is the most exact method, because it names the culprit instead of leaving you to guess.

3. Turn on Layout Shift Regions. In DevTools, open the Rendering panel and enable Layout Shift Regions. Shifted areas flash on the screen as they happen. Do a hard reload with the cache off, at mobile size, and watch where the flashes appear.

4. Test on a slow connection. Shifts are bigger and easier to see on slow networks. Set the network to a slow profile in DevTools and reload while watching the screen. A font swap that never shows on your fast office connection will show up clearly here.

Check the field data first, not the lab test. A lab load is clean: no consent banner state, no personalized ads, no slow fonts on a cold cache. Real visits have all of those, so the lab can look fine while real users see jumps.

Fix 1: Give images and videos a size

Colorful HTML code displayed on a computer screen
Source: Pexels

This is the most common cause, and the easiest fix. An image with no width and height takes up zero space until the file arrives. The browser paints the text around it, then the image loads and shoves everything below it down by its full height.

Put the real width and height on every image:

<img src="photo.jpg" width="1200" height="800" alt="A short description of the photo">

Modern browsers use those two numbers to work out the aspect ratio and hold the right space, even when CSS resizes the image. Add this CSS so images stay fluid without breaking the ratio:

img {
  max-width: 100%;
  height: auto;
}

For things where you cannot set dimensions directly, such as a video embed or a slider, reserve the space in CSS instead:

.video-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
}

The same rule applies to iframes, ads, and any box filled by a script. If you know the shape of what will arrive, declare the shape before it arrives.

Fix 2: Stop web fonts from reflowing text

A web font loaded with font-display: swap paints a fallback font first, then swaps in the web font when it arrives. If the two fonts have different widths, every line of text reflows and the page shifts. Three things help:

  • Preload the fonts you use above the fold. Tell the browser to fetch the font early, so the swap happens before the reader starts reading.
  • Keep the font set small. Each extra weight and style is another file that can arrive late. Most pages need two weights, not six.
  • Match the fallback to the web font. Pick a fallback font with similar letter widths, and use the CSS size-adjust property to tune it closer. The closer the match, the smaller the shift when the swap happens.

An even stricter option is font-display: optional. With it, the browser uses the web font only if it is already in the cache. First-time visitors see the fallback and no shift at all. The trade-off is that first-time visitors never see your chosen font on that visit, so use it only where the shift matters more than the font.

Fix 3: Hold space for ads, embeds, and banners

Anything that appears after the page loads can push content down: an ad, a related-posts box, a chat widget, a cookie banner, a newsletter pop-up. The fix is the same in every case: reserve the space, or keep the thing out of the flow.

  • Ad slots: give the slot a minimum height that matches the most common ad size it will hold. If the ad is smaller than the slot, the extra space stays empty, which is far better than a jump.
  • Cookie banners and notice bars: show them as an overlay on top of the content, not as a block inserted above it. A banner that covers the bottom of the screen shifts nothing. A banner that pushes the page down shifts everything.
  • Content added above what the reader sees: insert new content below the visible area, or reserve space for it first. Never inject a block above the fold after the page has loaded.
  • Embeds and widgets: give the container a fixed height or aspect ratio in advance, the same way you would for a video.

Fix 4: Animate with transform, not layout

Animations that change height, top, left, or margin trigger layout, and the shifts they cause count. Animations that change transform or opacity do not move anything in the layout, so they do not count.

  • To move an element, use transform: translate() instead of changing top or left.
  • To grow or shrink an element, use transform: scale() instead of changing width or height.
  • To show or hide an element, fade it with opacity instead of collapsing its height.

This also applies to accordions, menus, and expanding cards. If the content has to grow, reserve the space first or animate the change with transform so the rest of the page never moves.

Cumulative layout shift on WordPress

Most WordPress CLS problems come from four places, and all four are fixable without touching a theme file:

  • The cookie plugin. Check whether the banner overlays the page or pushes it. Most plugins have the setting. Many default to the wrong one.
  • Sliders and hero sections. A slider that builds itself in JavaScript starts at zero height. Give the container a fixed height or aspect ratio in the page builder settings.
  • Images added outside the media library. WordPress adds width and height to images inserted the normal way. Images placed by a page builder widget, a theme option, or pasted HTML often miss them. Check those first.
  • Ads and related-posts plugins. Give each ad slot a minimum height, and set related-posts boxes to load below the content, not above it.

After any fix, clear the cache and test again. A cached page can hide the problem on your screen while real visitors still see it.

How to check your fix worked

Fix one cause at a time and re-test after each change, so you know which fix did the work.

  1. Re-run the page in PageSpeed Insights and check the lab CLS number. It should drop right away.
  2. Record another DevTools Performance trace and confirm the shift events are gone.
  3. Wait for the field data. The field score comes from real visits over 28 days, so it moves slowly. A fix made today shows up in the field number over the next few weeks, not tomorrow.
  4. Keep watching Search Console. The Core Web Vitals report groups your URLs by good, needs improvement, and poor. When a group moves to good and stays there, the fix is done.

If the lab looks clean but the field score stays poor, the shift is probably caused by something the lab never sees: a consent banner, a personalized ad, or a font that only shifts on a cold cache. Test with a fresh browser profile, cache off, and a slow connection to reproduce it.

For the full technical detail behind the metric, Google’s own guide to Cumulative Layout Shift covers the scoring math, the session window, and the Layout Instability API. Run your checks at PageSpeed Insights.

Frequently asked questions

What is a good cumulative layout shift score?

0.1 or less is good. Between 0.1 and 0.25 needs improvement. More than 0.25 is poor. Google judges the 75th percentile of real visits, so most of your visitors need to be under 0.1, not just your fastest test.

Does cumulative layout shift affect SEO?

Yes. CLS is one of the Core Web Vitals, and page experience is a ranking signal. It is a small signal next to content and links, but a page that jumps also loses readers, and readers who leave do not convert. Fixing CLS helps both rankings and revenue.

Why does my CLS look fine in the lab but poor in the field?

The lab loads a clean page: no ads, no consent state, warm fonts, fast network. Real visits have ads that load late, fonts on cold caches, and banners that appear after consent. Those are the things that shift. Use the field data in PageSpeed Insights and Search Console as the real score, and use the lab only to find the cause.

Can cumulative layout shift be zero?

Yes, on a simple page it can be zero. On a page with ads, embeds, and web fonts, zero is hard to reach and not required. The goal is 0.1 or less, not zero. Get under 0.1 and spend the remaining time on content.

Fix the biggest shift first. On most sites that is an image without dimensions or a banner that pushes the page down. Reserve the space before the content arrives, and the page stops jumping.

Taylor Orlando

Taylor Orlando is a content writer at Meregate covering websites, SEO, and AI. Taylor breaks down complex topics into simple, practical guides that help small businesses build better websites, rank higher on Google, and get real value from AI tools — no jargon, no fluff.

Related Articles