How to Fix CLS (Cumulative Layout Shift) — Stop Layout Jank
Eliminate unexpected layout shifts and bring your CLS score below 0.1. Learn the exact causes of layout shift and production-ready fixes for images, fonts, ads, and dynamic content.
What is CLS?
Cumulative Layout Shift (CLS) measures visual stability — how much the page layout shifts unexpectedly while the user is viewing it. A good CLS score is below 0.1. Poor CLS (>0.25) means elements are jumping around, causing accidental clicks and a frustrating experience.
CLS is the most common Core Web Vital failure. Over 50% of sites fail the CLS threshold.
Top Causes of CLS
Fix 1: Always Set Image Dimensions
Always include width and height attributes on images:
Or use CSS aspect-ratio:
This lets the browser reserve space before the image loads, eliminating shift entirely.
Fix 2: Use font-display: swap
Prevent invisible text (FOIT) and minimize text reflow with font-display:
Even better, preload your primary font:
Fix 3: Reserve Space for Dynamic Content
For ads, banners, or lazy-loaded sections, use CSS min-height to reserve the space:
Never insert content above existing content in the DOM.
Test these fixes on your site
Run a free audit to see your current CLS score and get prioritized fix recommendations.
Run Free Audit