Home › Blog › How to Fix Cumulative Layout Shift (CLS) on Your Website
How to Fix Cumulative Layout Shift (CLS) on Your Website
Cumulative Layout Shift, or CLS, measures how much the content moves around while the page loads. Have you ever tried to tap a button and the page jumped? That is layout shift. A score of 0.1 or less is good.
Common causes
- Images without width and height.
- Ads, embeds or banners that appear late and push content down.
- Fonts that change size after loading.
- Content inserted above what the visitor is reading.
Fix 1: set image sizes
Add width and height to every image so the browser reserves the right space before it loads.
Fix 2: reserve space for ads and embeds
Give ad slots and video embeds a fixed minimum height. Then the page does not jump when the ad arrives. This is important if you use AdSense or similar programs.
Fix 3: control fonts
Use font display swap and choose a fallback font that has a similar size to your main font.
Fix 4: add new content carefully
Do not insert banners or cookie notices at the top after the page is already visible. Place them in space that was reserved from the start, or at the bottom of the screen.
How to test
Run a speed test on mobile and watch for the CLS number. If it is high, the report lists the elements that moved.
Frequently asked questions
What is a good CLS score?
0.1 or less is good. Above 0.25 is poor.
Do ads cause layout shift?
They can, if the space is not reserved. Set a minimum height for each ad slot.
Related articles
- Core Web Vitals Explained in Simple Words
- How to Fix a Slow Largest Contentful Paint (LCP)
- Mobile-Friendly Website Checklist: 10 Things to Check Today
- HTTPS and SSL: Why Your Website Needs the Padlock
- How to Compress Images for Your Website Without Losing Quality
- How to Host a Website for Free on Cloudflare Pages
Free tools: Free website checker in Urdu · Free website speed test · Free SEO checker in Roman Urdu
Check my website free