Stop layout shifting (CLS)

Reserve space for images and embeds so the page stops jumping while loading.

What it means

CLS (Cumulative Layout Shift) measures how much visible content moves around while the page loads. Buttons that dodge your cursor and text that gets pushed down are layout shifts.

Why it matters

Shifting layouts cause mis-taps and frustration — and Google penalises them directly in mobile rankings. High CLS is one of the fastest ways to make a site feel broken.

How to fix it

  1. Add explicit width and height (or an aspect-ratio CSS property) to every <img> and <video> tag so the browser can reserve space before loading.
  2. Reserve space for embeds (ads, videos, social posts, maps) with a fixed-height container.
  3. Never inject banners, cookie bars, or sign-up prompts above existing content after the page has loaded — overlay them instead.
  4. Load web fonts with font-display: swap and preloaded font files so text doesn't reflow when the real font arrives.
  5. Verify with PageSpeed Insights until CLS is below 0.1.

Helpful tools

Not sure if this affects your site? Analyze your website for free or compare it with a competitor.

Related guides

Browse all 38 fix guides