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.
- Page paintsHeadline, hero and form are visible
- Consent script loadsRuns a moment later
- Banner inserted at topContent is pushed down
- 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.
Example: illustrative scores for one landing page. Your numbers will differ.
How to check if your site has it
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.
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.
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.
Compare with and without the banner
Test again after accepting cookies (the banner stays hidden). If CLS drops sharply, the banner is the cause.
Test on a phone
Check a real mobile device or the DevTools device toolbar, where banners are bigger and shifts worse.
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.
Open your consent plugin settings
In plugins such as Complianz, CookieYes, Cookiebot or Borlabs, look for the banner position or layout setting.
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.
Clear caches
Purge your caching plugin and CDN, then re-test in a private window.
Open your consent app or theme settings
Go to Settings > Customer privacy for the built-in banner, or open your cookie app's settings.
Select a floating position
Choose a bottom or corner placement. If the theme has an announcement area for the banner, avoid it.
Preview on mobile
Check the live store in a private window on a phone.
Find the consent tag
Open the tag that loads your banner (for example a Cookiebot or custom HTML tag).
Add CSS that fixes the position
If the tool cannot change its layout, add a custom stylesheet that sets the banner container to position: fixed (see the code below). Use your banner's real element ID or class.
Preview and publish
Use Preview mode, check the page for movement, then publish.
Check how the banner is added
If you built it in the Designer, set the banner element to Position: Fixed, anchored bottom, with a high z-index.
Or change the third-party setting
If a consent tool injects it, switch its layout to floating in that tool's dashboard.
Publish and re-test
Publish the site and test in a private window.
Review where the banner is added
If you paste a consent script in funnel or website Settings > Tracking Code, open the consent tool's own dashboard to change the layout.
Use a floating layout
Pick a bottom or corner box. If the tool has no such option, add custom CSS in the page's custom code area.
Test each funnel step
Open every step in a private window to confirm nothing moves.
Open the cookie banner settings
In the Wix dashboard, go to Settings > Cookie Banner (or the Wix cookie consent settings for your site).
Choose a layout that floats
Pick the corner or bottom position in the design options.
Publish and test
Publish and check on mobile.
Open Cookie Banner settings
Go to Settings > Cookies & Visitor Data and review the banner options. Squarespace's built-in banner uses a floating style.
Check any third-party banner
If you added one through Code Injection, change its layout in its own dashboard.
Re-test
Open the live site in a private window and watch for movement.
Make the banner fixed
Set position: fixed with bottom: 0 so it sits above the page instead of inside the flow. Use the CSS below.
Or reserve the space
If it must be in the flow, put a placeholder with the same height in the HTML so the layout does not change when the banner appears.
Render it early
Load the banner script without delay, and avoid inserting it above existing content after load.
#cookie-banner {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
max-height: 40vh;
overflow-y: auto;
}.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 */
}
}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
- 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
- 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.
Related issues
- PRF-025CLS over 0.1 on a funnel stepFix guide
- PRF-027Promo/announcement bar injected at top after loadFix guide
- PRF-032Chat widget launcher pushes footer or CTAFix guide
- PRF-036Lazy-loaded section above the viewport shifts scroll positionFix guide
- PRF-038CTA moves just as user taps it (mis-click onto other element)Fix guide
- PRF-037CLS from content swapped in by personalisation/A-B toolFix guide