Skip to content
ThemesIonic — home
Elementor

Elementor Sticky Headers

Sticky is a Pro motion effect applied to a container, not a dedicated header feature. Most of what goes wrong with a sticky header comes from applying it to the wrong element or ignoring what it does to the layout below it.

Updated 5 min read intermediate

Sticky is a motion effect you apply to a container, most often the one holding your header, rather than a header-specific toggle. It pins that element to the viewport as the visitor scrolls, and every problem people run into with it — overlap, layout jumps, mobile clutter — comes from treating it as a simple on/off switch instead of understanding what "pinned to the viewport" actually does to the rest of the page.

Applying sticky to the right element

Sticky works on containers — the same flexbox container element used throughout the rest of a layout — and it should be applied to the smallest container that represents your header as a visual unit — not a page-level wrapper that happens to contain the header along with other content. Apply it to the wrong container and you either pin more than intended or find that padding and margins on a parent element break the pinning behaviour entirely. If your header is built from nested containers, put the sticky effect on the outermost one that draws the header's own background, border and shadow.

Offset and effects below

The sticky setting includes an offset, which is the distance from the top of the viewport where the element should stop and hold. Leave it too small and the sticky header can sit under a fixed admin bar for logged-in users; account for that separately if your site shows one. There is also a setting for how the effect behaves relative to other elements below it in the stacking order — get this wrong and content that should scroll under the header instead pushes it out of place, or the header ends up behind content it should sit above.

Shrinking the header on scroll

Elementor does not offer a single toggle that shrinks a header's height as the page scrolls. The common approach is custom CSS that targets the class Elementor adds to a sticky element once it activates, applying a smaller height, tighter padding, or a smaller logo at that state — keep those overrides tied to the site's Global Colors and Fonts rather than hardcoding one-off values that drift from the rest of the design. This means shrinking behaviour is effectively a custom CSS exercise layered on top of the built-in sticky effect, not a setting you will find in a panel. Keep the transition short and the size change modest — a header that visibly lurches on every scroll reads as broken rather than polished.

Overlap and z-index problems

A sticky element is removed from the normal flow and pinned above everything else, which means it can sit on top of content that was never designed to have anything overlapping it — a hero image with text near the top, for instance, disappearing behind the header the instant it activates. Sticky elements also compete for stacking order with anything else fixed on the page: cookie-consent banners, "back to top" buttons, chat widgets. When two fixed elements collide, whichever has the higher stacking value wins, and the loser becomes unreachable or visually buried.

The content jump

Because the sticky element leaves the document's normal flow, the space it used to occupy collapses, and the content below shifts upward to fill it — then, once the browser evaluates the sticky behaviour, the header reappears and pushes everything back down. Visitors experience this as the page jumping at the top of the load or on the first scroll. Reserving space equal to the header's own height, either through the container's own layout or a small CSS adjustment, keeps this from happening and avoids compounding the cumulative layout shift your other content already risks.

Mobile behaviour and when to switch it off

A sticky header permanently occupies vertical space, which is already the scarcest resource on a phone screen once the browser's own address bar is accounted for. What reads as a helpful, always-available navigation on desktop can feel like it is eating the page on mobile, especially on a layout that also needs to work across inconsistent mobile rendering. Elementor lets sticky be scoped to specific devices; test the actual behaviour on a phone before deciding whether it earns its space there, and disable it for smaller breakpoints if it does not.

The CSS alternative

Plain CSS position: sticky with a top value achieves the same pinning without Elementor's scroll-driven JavaScript running behind it, and it is generally lighter — worth weighing against how to speed up Elementor if performance is tight. The trade-off is that pure CSS sticky has no concept of showing on scroll-up and hiding on scroll-down, no device-specific toggle from a settings panel, and no shrink behaviour without writing that JavaScript yourself. Choose CSS when the header just needs to stay visible; choose the Pro effect when you need conditional behaviour built in.

Common mistakes

  • Applying sticky to a wrapper that holds more than the header. Scope it to the exact element you want pinned.
  • Ignoring the admin bar when setting the offset. Logged-in users see a gap or an overlap that visitors never encounter.
  • Trying to shrink the header without custom CSS. There is no built-in toggle for it.
  • Not reserving space for the layout jump. It shows up as a visible flash on load.
  • Leaving sticky enabled on every device by default. Mobile is where it costs the most and helps the least.
  • Stacking a sticky header with another fixed element without checking z-index. One will end up behind the other.

Verify

Load the page logged out, scroll past the header's normal position, and confirm it pins cleanly with no overlap on the content beneath it. Reload the page and watch closely for a jump at the top before the header settles. Then repeat the check on a phone with the address bar visible, and decide there whether sticky earns its space on that breakpoint.

Frequently asked

The Sticky motion effect, along with per-device control and scroll-based behaviour, is part of Elementor Pro. See Elementor free versus Pro for what each tier includes.
The header leaves the normal document flow and the content below moves up to fill the gap, then gets pushed back down once the sticky element is measured. Reserve space equal to the header's height to prevent it.
Often not. A fixed header permanently consumes vertical space that is already scarce on a phone, competing with the browser's own address bar. Test it and disable it per device if it hurts more than it helps.

Related guides