SEO & Speed Optimization

Fix Cumulative Layout Shift (CLS): Stop Your Page From Jumping While It Loads

Ever tried to tap a button and the page jumped? That's layout shift. Here's how to find and fix CLS on your website.

In this article · 6 sections
  1. Common causes
  2. How to find shifts
  3. Fixes
  4. 1. Always set image dimensions
  5. 2. Reserve space for embeds and ads
  6. 3. Stabilise fonts
  7. 4. Overlay, don't push
  8. 5. Load dynamic content into reserved space
  9. 6. Animate with transform
  10. 7. Skeletons that match final size
  11. Sliders and carousels
  12. Check after every design change
  13. FAQs
  14. Do shifts after user interaction count?
  15. Why is my CLS fine in tests but poor for real users?

You go to tap "Call now" and the page suddenly jumps; you tap an ad instead. That's layout shift, measured by the Core Web Vital Cumulative Layout Shift (CLS). A "Good" CLS is 0.1 or less. Here's how to fix cumulative layout shift on real websites.

Common causes

  1. Images and videos without dimensions
  2. Ads, embeds and iframes that load late and push content
  3. Web fonts swapping in with different sizes
  4. Banners and cookie bars inserted at the top after load
  5. Dynamic content (reviews widgets, "related posts") injected above existing content
  6. Animations that change layout properties

How to find shifts

  • PageSpeed Insights: "Avoid large layout shifts" lists elements
  • Chrome DevTools → Performance: Layout Shift entries highlight moving elements
  • Search Console: CLS issues by page group

Fixes

1. Always set image dimensions

<img src="team.webp" width="800" height="533" alt="Our team">

Or use CSS aspect-ratio. See responsive images.

2. Reserve space for embeds and ads

.map-embed { aspect-ratio: 16 / 9; }
.ad-slot { min-height: 250px; }

3. Stabilise fonts

  • Use font-display: swap with a well-matched fallback font
  • Preload the main font
  • Consider size-adjust on fallback fonts to match metrics

See web fonts and speed.

4. Overlay, don't push

Cookie bars, offer banners and chat buttons should overlay (fixed position) rather than insert content above the page.

5. Load dynamic content into reserved space

Give widgets a fixed-height container, or load them below the fold.

6. Animate with transform

Animate transform and opacity, not top, height or margin. See CSS animation tutorial.

7. Skeletons that match final size

See skeleton loading screens.

Sliders and carousels

Sliders that resize as images load are a frequent CLS source. Give slides fixed dimensions, or replace sliders with a static hero.

Check after every design change

New banners, widgets and plugins often reintroduce shifts. Make CLS part of your monthly checks.

FAQs

Do shifts after user interaction count?

Shifts within a short time after a user interaction (like opening an accordion) are excluded from CLS.

Why is my CLS fine in tests but poor for real users?

Real users see ads, cookie consent, slow networks and different fonts. Field data captures these.

Joboo Web builds stable layouts with zero-jump hero sections. Get a free CLS check.

Was this article helpful?

Your answer helps us improve our guides

Share this article

Joboo Web

Web design, SEO & digital marketing team · Ludhiana, Punjab

Joboo Web has helped Indian businesses grow online since 2019 — building fast websites and running SEO, Google Ads and social campaigns for clients in 80+ cities. About us →

Keep reading

💬
👋 Need a website or more leads? Ask me!