Group
  • Performance

    Fix layout shift (CLS) on my pages

    Find what makes your pages jump around while loading and pin every element to a stable position.

    • Improve quality
    • Debug & fix
    • Beginner
    • General

Free Prompt

My pages visibly jump and shift while they load. Text moves, buttons slide, and users sometimes tap the wrong thing because the layout moved under their finger. Find and fix the causes of layout shift: 1. Images and video embeds without explicit width and height (or aspect-ratio) attributes. The browser can't reserve space, so content reflows when the media loads. Add dimensions or aspect-ratio to every media element. 2. Web fonts swapping in and reflowing text. Check my font loading strategy and recommend font-display settings plus size-adjust/fallback metric overrides where they'd help. 3. Dynamically injected content above existing content: banners, cookie notices, ads, error messages, promotional bars that push the page down after render. Reserve space for them or render them in a way that doesn't shift content. 4. Elements whose size changes when JavaScript hydrates or data loads: cards that grow, lists that expand, skeletons that don't match the final size. Make loading placeholders the same dimensions as the loaded content. 5. CSS that loads late and restyles visible elements. Don't just tell me to 'improve my CLS score'. Point at the specific elements causing the shift and give me the code changes. The deliverable is a list of the shifting elements with fixes, plus how to verify the shift is gone (before/after measurement, e.g. with a throttled load in dev tools).

What This Does / How This Helps

This finds the specific elements making your pages jump during load and fixes each one: missing image dimensions, font swaps, injected banners, and mismatched loading placeholders. Layout shift is one of the most common quality complaints on vibe-coded pages, and it directly causes wrong taps on mobile. A user goes to hit 'cancel' and the page shifts, so they hit 'confirm'. Beyond the usability problem, CLS is a Core Web Vitals metric that affects how Google ranks your pages, so a page that jumps around is quietly hurting both your users and your search traffic.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts