Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Cookie banner pushing content down (CLS 0.3): how to fix it

PRF-026High impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

Cumulative Layout Shift (CLS) is a score for how much visible content jumps around while a page loads. Google counts a score of 0.1 or less as good and above 0.25 as poor. A CLS of 0.3 is in the poor range.

A cookie banner causes this when it is added to the page by a script after the first paint and sits in the normal page flow, for example as a bar at the top. The browser has to move the header, hero and form down to make room. Everything the visitor was looking at jumps.

How a pushing banner disrupts a lead page
  1. Page paintsHeadline, hero and form are visible
  2. Consent script loadsRuns a moment later
  3. Banner inserted at topContent is pushed down
  4. Visitor taps buttonButton has moved under their finger

The page paints, then the banner script inserts itself and shifts everything below it.

Why it costs you leads or sales

People who are about to tap a button or start typing see the page move. They may tap the wrong element, lose their place or leave. On mobile the banner often takes a large share of the screen, so the shift is more obvious.

There is also a ranking angle. CLS is one of Google's Core Web Vitals, so a poor score on landing pages can count against the page in search results. Ad landing pages with poor experience can also waste paid clicks.

CLS before and after changing the bannerExample numbers
CLS before and after changing the banner (example)Banner pushes content: 0.3 CLS score; Banner as overlay: 0 CLS score; Good threshold: 0.1 CLS score0010.300.1Banner pushes contentBanner as overlayGood thresholdCLS score

Example: illustrative scores for one landing page. Your numbers will differ.

How to check if your site has it

Find out whether the banner is the cause
  1. Open the page in a private window

    Use a window with no saved cookies so the banner appears. Watch whether the content jumps down when it shows.

  2. Run PageSpeed Insights

    Test the URL at pagespeed.web.dev. Under Diagnostics, open Avoid large layout shifts and check whether the listed elements sit below the banner.

  3. Record in Chrome DevTools

    Open the Performance panel, tick Screenshots, reload and record. In the Experience row, click each red Layout Shift marker to see which node moved and by how much.

  4. Compare with and without the banner

    Test again after accepting cookies (the banner stays hidden). If CLS drops sharply, the banner is the cause.

  5. Test on a phone

    Check a real mobile device or the DevTools device toolbar, where banners are bigger and shifts worse.

What the visitor sees

The page looks ready, then the banner appears and the content jumps.

How to fix it

You have two options. The best one is to make the banner an overlay (fixed position), so it floats above the page and does not move anything. The other is to reserve space for it so the page already has room when it appears.

Fix by platform
  1. Open your consent plugin settings

    In plugins such as Complianz, CookieYes, Cookiebot or Borlabs, look for the banner position or layout setting.

  2. Choose a floating or bottom layout

    Pick a box, popup or bottom bar layout rather than a top bar that pushes the page. Exact option names depend on the plugin.

  3. Clear caches

    Purge your caching plugin and CDN, then re-test in a private window.

Make the banner an overlay (replace the selector with your banner's)css
#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  max-height: 40vh;
  overflow-y: auto;
}
Alternative: reserve space for an in-flow bannercss
.cookie-banner-slot {
  min-height: 96px; /* match the real banner height on desktop */
}
@media (max-width: 600px) {
  .cookie-banner-slot {
    min-height: 160px; /* match the real banner height on mobile */
  }
}
Banner behaviour

Before

  • Banner sits in the page flow at the top
  • Header, hero and form jump down on load
  • CLS around 0.3
  • Taps land on the wrong element

After

  • Banner floats over the page or has reserved space
  • Nothing else moves when it appears
  • CLS under 0.1
  • Buttons stay where visitors expect them

How to confirm it's fixed

Confirmation checks
  • Load the page in a private window and watch: nothing moves when the banner appears
  • Re-run PageSpeed Insights and check CLS is 0.1 or lower on mobile
  • Record in DevTools Performance and confirm no layout shift is attributed to the banner
  • Accept, reject and close the banner and check the page stays still each time
  • Test every funnel step, not just the home page
  • Check the real-user CLS in Search Console's Core Web Vitals report after a few weeks, as it uses field data and updates slowly

How to prevent it happening again

Prevention habits
  • Choose a consent tool that offers a floating or overlay layout
  • Re-test CLS whenever you change the banner design, theme or consent provider
  • Test with cookies cleared, since returning visitors never see the banner
  • Keep the banner text short so it stays small on phones
  • Add a CLS check to your release checklist for landing pages

How FunnelGuard handles this

FunnelGuard covers this issue partly. Its robot visitor runs your funnel steps on a schedule and detects that layout shift (CLS) is high on a step. It does not name the element that moved, so it cannot tell you the cause is the cookie banner.

To cover the rest by hand: when FunnelGuard flags a CLS problem, open that page in a private window, watch whether a banner pushes content, and use the DevTools Performance panel to see which node shifted. Then apply the fix above and re-test. A free read-only website audit is also available, and the Free plan covers 1 site and 2 journeys with daily checks, no card needed.

Questions people ask

Why is my cookie banner causing a high CLS score?

The banner is probably inserted by a script after the page has already painted, and it sits in the normal page flow. The browser then moves everything below it down, which counts as layout shift. Making it a fixed overlay or reserving its space stops the shift.

Does a cookie banner affect Core Web Vitals?

Yes, it can. If it pushes content when it appears it adds to CLS, and a large banner can also be the largest element and affect Largest Contentful Paint. A banner that floats above the page usually has little or no effect.

What is a good CLS score?

Google treats 0.1 or lower as good, 0.1 to 0.25 as needing improvement, and above 0.25 as poor. A score of 0.3 falls in the poor range and should be fixed on landing and checkout pages.

How do I stop my cookie banner moving the page?

Change its position to fixed, at the bottom or as a corner box, so it overlays the content. If it has to sit in the page flow, add a placeholder of the same height so the layout already has room for it.

How can I tell if the cookie banner is the cause of layout shift?

Compare CLS with the banner visible and after accepting cookies. You can also record the page in the Chrome DevTools Performance panel and click each Layout Shift marker to see which elements moved.

Is it OK to hide the cookie banner to fix CLS?

No, not if you need consent from visitors. Hiding it can breach privacy rules and stop consent-based tracking from working properly. Change the layout instead of removing the banner.

Can FunnelGuard tell me my cookie banner is causing CLS?

Partly. FunnelGuard detects high CLS on a funnel step but does not name the element that shifted. You need to check by hand, using a private window and DevTools, whether the banner is the source.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: CLS detected, source element not named.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.