Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Sticky header too tall on mobile: how to find and fix it

PRF-157Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

A sticky header is a bar that stays pinned to the top of the screen as the visitor scrolls. On a desktop monitor that is fine. A phone in portrait is often only 600 to 750 CSS pixels tall once the browser's own bars are counted, so a 160 px header already takes about a quarter of the visible space.

It usually gets this big by stacking things: an announcement bar, a logo row, a search or menu row, and sometimes a promo strip or a cookie banner. Each is reasonable alone. Together they leave a thin slice of page.

Why it costs you leads or sales

Visitors on phones read in short glances. If a quarter or more of the screen is permanently taken, they see less of your headline, form or product, and a keyboard opening on a form can leave almost no room at all. Sticky headers can also cover the field a visitor is typing in or the target of an anchor link.

How a tall header loses the lead
  1. Visitor opens pagePhone, portrait
  2. Header fills 25%+Banner, logo and menu all pinned
  3. Form or CTA hiddenLittle room left to read or tap
  4. Lead or saleVisitor leaves first

The header is not an error, but it pushes the action out of sight.

Share of a phone screen left for contentExample numbers
Share of a phone screen left for content (example)No sticky header: 100 %; Compact 56 px header: 92 %; Stacked 180 px header: 74 %; Header plus keyboard open: 35 %03877100927435No sticky headerCompact 56 px headerStacked 180 px headerHeader plus keyboard …%

Example: illustrative numbers for a 700 px tall viewport, not measured data.

How to check if your site has it

Measure your sticky header
  1. Open device mode

    In Chrome, press F12, then the device toolbar icon (Ctrl+Shift+M). Choose a phone such as 390 x 844 or a small one at 360 x 640.

  2. Scroll down a little

    Scroll past the top of the page so only the sticky parts remain pinned.

  3. Inspect the pinned elements

    Right-click the header, choose Inspect, and look at the computed height. Add up every element with position: fixed or sticky, including banners.

  4. Divide by the viewport height

    If pinned height divided by screen height is above 0.25, you have this issue. Repeat with the keyboard in mind by tapping a form field on a real phone.

Paste in the browser console (device mode on)javascript
let h = 0;
document.querySelectorAll('*').forEach(el => {
  const s = getComputedStyle(el);
  const r = el.getBoundingClientRect();
  if ((s.position === 'fixed' || s.position === 'sticky') && r.top <= 5 && r.height > 0) {
    h += r.height;
    console.log(el, Math.round(r.height));
  }
});
console.log('Pinned at top: ' + Math.round(h) + 'px = ' + Math.round(h / innerHeight * 100) + '% of viewport');

How to fix it

Pick the lightest option that works: make the header smaller, hide it when the visitor scrolls down, or stop it sticking on mobile. Aim for a pinned area under about 15% of the screen, which is roughly 56 to 80 px on most phones.

Fix it on your platform
  1. Use the theme's sticky settings

    Open Appearance > Customize (or Site Editor) and the Header section. Many themes and builders (Elementor, Divi, Astra, Kadence) have a sticky option with per-device toggles. Turn sticky off for mobile or reduce its height.

  2. Remove extra pinned bars

    Make announcement or notice bars non-sticky, or dismissible, in their plugin settings.

  3. Or add CSS

    If there is no setting, add the CSS below under Appearance > Customize > Additional CSS, adjusting the selector to your theme's header class.

Make the header scroll away on phones (adjust the selector)css
@media (max-width: 768px) {
  .site-header,
  header.sticky {
    position: static !important;
  }
  .announcement-bar {
    position: static !important;
  }
}
Optional: hide header on scroll down, show on scroll upjavascript
let lastY = window.scrollY;
const header = document.querySelector('.site-header');
header.style.transition = 'transform .25s';
window.addEventListener('scroll', () => {
  const y = window.scrollY;
  if (y > lastY && y > 80) {
    header.style.transform = 'translateY(-100%)';
  } else {
    header.style.transform = 'translateY(0)';
  }
  lastY = y;
}, { passive: true });
Header before and after

Before

  • Banner, logo and menu all pinned
  • About 180 px pinned (example)
  • Form field hidden behind header when focused

After

  • One slim row or header scrolls away
  • About 56 px pinned or none (example)
  • Headline, form and CTA visible on load

How to confirm it's fixed

Confirmation checklist
  • Pinned height is under about 15% of screen height at 360 x 640 and 390 x 844
  • Main headline and CTA are visible without scrolling, or scroll into view without being hidden
  • Tapping a form field does not hide it behind the header
  • Anchor links land with the target heading fully visible
  • Checked on a real iPhone and Android phone, not only device mode

How to prevent it happening again

Set a header budget (for example, 64 px on mobile) and put it in your design notes. Re-measure after theme updates, new announcement bars, cookie banners, or marketing plugins, since each can add another pinned layer. Review the page on a phone whenever a campaign banner goes live.

How FunnelGuard handles this

FunnelGuard does not check header height or layout on mobile today. A check like this is a possible future addition. What FunnelGuard does do is run your real journeys on a schedule, such as lead forms, checkouts and booking buttons, and check each step, the tracking hits and whether test leads arrive. If a header stops a robot visitor from reaching or clicking a button, the step can fail, but that would show up as a broken journey, not as a header-size warning.

To watch for this yourself, re-run the console snippet above after each design change, and put a quarterly phone check in your calendar. Browser audit tools such as Chrome DevTools device mode and Lighthouse can help you review mobile layouts. The Free plan (1 site, 2 journeys, daily checks, no card) lets you monitor your key form journey in the meantime.

Questions people ask

Why does my sticky header take up so much space on mobile?

Usually several elements are pinned together: an announcement bar, a logo row and a menu row, plus padding sized for desktop. On a phone that stack can fill a quarter or more of the screen. Measure each pinned element and remove or shrink the ones that are not essential.

How tall should a sticky header be on mobile?

There is no official limit, but a common rule of thumb is to keep pinned elements to roughly 56 to 80 px, or under about 15% of the screen height. Anything over 25% is worth fixing. Test on small phones around 360 x 640, where the problem is worst.

How do I make my header not sticky on mobile?

Check your theme or builder for a sticky option with a per-device toggle. If there is none, use a media query that sets the header to position: static below your mobile breakpoint, such as max-width: 768px.

Is a sticky header bad for conversions?

Not by itself. A slim sticky header can help visitors navigate. It becomes a problem when it is tall enough to hide content, form fields or the CTA on small screens. Measure it on a real phone before deciding.

Why does my sticky header cover the form field when I tap it?

When the keyboard opens, the visible area shrinks and the browser scrolls the field into view, sometimes right under the pinned header. Making the header smaller, or letting it hide on scroll, usually fixes it. You can also add scroll-margin-top to the form fields.

How do I fix a sticky header covering anchor link targets?

Add scroll-margin-top to the target elements, set to the header height, for example section[id] { scroll-margin-top: 72px; }. The browser then stops scrolling short of the header instead of under it.

Does FunnelGuard check if my mobile header is too big?

No. FunnelGuard does not check header height or mobile layout yet, though it is a possible future check. It does run your real form and checkout journeys on a schedule and checks each step, tracking hits and test lead delivery.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

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.