On this page
What this issue is
A sticky header stays at the top of the screen while you scroll. Many themes make it shrink after a few pixels of scrolling: the logo gets smaller, the padding drops and the bar gets thinner. That looks neat, but it can also change how much room the header takes in the page.
When the height changes, everything below the header moves. This is a layout shift. Two common causes: the header switches from position: static to position: fixed and is taken out of the page flow, so content jumps up by the header's height; or a script changes the header's height or padding on scroll, so content moves a little on every step.
Why it costs you leads or sales
The impact is usually small, which is why this issue is rated low. But a jump while someone is reading or aiming at a button is annoying. A form field, a Buy button or a tab can slide away just before the tap. On phones the header is a larger share of the screen, so the effect is stronger.
Layout shifts caused directly by scrolling are often not counted in Cumulative Layout Shift, since shifts shortly after user input are excluded. The jump can still feel broken, and a header that jumps at page load or on a resize does count.
- Visitor scrollsScroll passes a small threshold
- Header resizesHeight or position changes
- Content jumpsText and buttons move
- Mis-tap or exitWrong click or lost place
The visitor scrolls, the header resizes, and the page moves under their finger.
How to check if your site has it
Scroll slowly on a real page
Open a landing page or product page. Scroll down 50 to 100 pixels and watch whether the text below the header jumps.
Test on a phone size
In Chrome DevTools, turn on device mode and repeat. Also test scrolling back to the top, where the header often grows again.
Inspect the header
Right-click the header, choose Inspect, then scroll and watch the Styles panel. Look for a class added on scroll (such as is-sticky or shrink) and for changes to height, padding, position or top.
Record the layout shifts
In DevTools open Performance, tick Screenshots, record while scrolling, and look for red Layout Shift entries in the Experience row. Click one to see which element moved.
How to fix it
The goal is that the header's footprint in the page never changes. Choose one of the approaches below, then apply it in your platform.
/* Keep the header in the page flow and let the browser stick it */
.site-header {
position: sticky;
top: 0;
z-index: 100;
height: 80px; /* fixed footprint */
}
/* Visual shrink only: no layout change */
.site-header .logo {
transform-origin: left center;
transition: transform 0.2s ease;
}
.site-header.is-scrolled .logo {
transform: scale(0.8);
}body {
padding-top: 80px; /* same as the header height */
}
.site-header {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 80px;
}Check the theme or builder setting
Open Appearance > Customize (or your builder's header settings, such as Elementor, Divi or Astra) and look for Sticky header and Shrink on scroll. Turn shrink off, or set the sticky height equal to the normal height, then test.
Add CSS if needed
Go to Appearance > Customize > Additional CSS, and use the stable footprint pattern above with your theme's header class. Use a child theme or the Customizer so updates do not remove it.
Check the theme setting
In Online Store > Themes > Customize, open the Header section and look for a sticky header option. Some themes shrink the header through their own script.
Edit the CSS
In the theme code, find the header section and its stylesheet (for example base.css or theme.css). Make the height constant and move the shrink effect to transform. Duplicate the theme before editing.
Use sticky positioning
Select the navbar, set Position to Sticky with top 0 in the Style panel, so it stays in the flow.
Avoid height interactions
In Interactions, remove any scroll action that changes the navbar's height or padding. Animate scale or move instead, which uses transform.
Use the built-in header settings
In the Wix Editor, select the header and open its settings. Set it to stay fixed at the top, and avoid a Shrink on scroll effect if the page jumps. In Wix Studio, check scroll effects on the header and remove any that change its size.
Check header behavior
Open Website > Pages > Website Tools > Header (the path varies by version). Choose the sticky or fixed header option and turn off any option that changes size on scroll. If the jump remains, add CSS in Custom CSS.
Review the header row in the builder
In the funnel or website builder, open the header section and check any sticky or scroll settings. Keep the row height constant, and add custom CSS in the page settings if you need the stable footprint pattern.
Prefer CSS sticky
Replace scroll scripts that toggle position: fixed with position: sticky; top: 0, so the header never leaves the flow.
Animate with transform
If you want a shrink effect, scale inner elements with transform and opacity. Do not animate height, padding, margin or top.
Reserve space for fixed headers
If the header must be fixed, give the body or the first element a padding-top equal to the header height.
Before
- Header changes from 120px to 60px on scroll
- Content below moves up by 60px
- Header flickers near the scroll threshold
After
- Header footprint stays at one fixed height
- Only the logo scales, using transform
- No movement of content below
How to confirm it's fixed
- Scroll slowly down and up on desktop: no content jump and no flicker
- Repeat on a phone-size viewport and on a real phone
- Record a Performance trace while scrolling and find no new Layout Shift entries
- Check anchor links: the target is not hidden under the header (consider scroll-margin-top)
- Test a key page such as a form or product page, including a tap on the main button after scrolling
How to prevent it happening again
Theme updates, new builder widgets and new announcement bars can bring the shrink effect back. Add a scroll test to your release checklist for any change to the header, and keep header styles in one place so they are easy to review. Prefer position: sticky and transform for effects. When you add a banner above the header, retest, because it changes where the header sticks.
How FunnelGuard handles this
FunnelGuard does not check for this yet. A sticky header that changes height on scroll is a possible future check, but today it is not monitored.
What FunnelGuard does cover nearby: it runs your real customer journeys on a schedule, from the EU or the US, and checks that each step works, such as forms, checkouts, and booking and chat buttons. If a header problem stops a button from being clicked and a journey step fails, the failure is re-checked from a second region and you get one alert with a screenshot and a likely cause. It will not tell you that the header is jumping.
To watch for the jump yourself, run PageSpeed Insights or Lighthouse on key pages after theme changes, record a Performance trace in Chrome DevTools, and scroll your main pages on a phone as part of each release. The free plan (1 site, 2 journeys, daily checks, no card) can monitor your key journeys while you do this.
Questions people ask
Why does my sticky header make the page jump when I scroll?
Usually the header changes its height or switches from static to fixed positioning. Either change alters the space the header takes in the page, so the content below moves. Keeping the header's footprint constant stops the jump.
How do I stop a shrinking sticky header from causing layout shift?
Give the header a fixed height and shrink only inner elements with transform: scale(). Alternatively use position: sticky; top: 0, which keeps the header in the page flow. Do not animate height, padding or margin.
Does a sticky header affect Cumulative Layout Shift?
It can. Shifts that happen at load or on resize count, such as a header that changes size when scripts run. Shifts that follow user input like scrolling are often excluded from the score, but they can still feel broken to visitors.
Should I use position fixed or position sticky for a header?
Position sticky is usually simpler because the header stays in the page flow and no space needs reserving. Position fixed removes it from the flow, so you must add padding-top equal to the header height. Either works if the footprint stays constant.
Why does my header flicker when I scroll near the top?
The shrink often changes the page height, which changes the scroll position and triggers the opposite state, creating a loop. Make the shrink visual only, with transform, or add a gap between the shrink and grow thresholds.
How can I see which element shifted when I scroll?
Record a trace in the Chrome DevTools Performance panel while scrolling. Layout Shift entries appear in the Experience row, and clicking one shows the elements that moved and by how much.
Does FunnelGuard detect a sticky header that jumps on scroll?
No. FunnelGuard does not check for this yet, though it is a possible future check. It does run your funnel journeys and alerts you if a step fails, so a header issue that blocks a button could surface as a failed step.
Related issues
- PRF-025CLS over 0.1 on a funnel stepFix guide
- PRF-027Promo/announcement bar injected at top after loadFix guide
- PRF-026Cookie banner pushes content down, CLS 0.3Fix guide
- PRF-032Chat widget launcher pushes footer or CTAFix guide
- PRF-038CTA moves just as user taps it (mis-click onto other element)Fix guide
- PRF-036Lazy-loaded section above the viewport shifts scroll positionFix guide