A sticky header should let users access the navigation, search, or tools they need without returning to the top of the page. It should take up as little space as possible, leave content unobstructed, and avoid animations that disrupt reading. Before designing one, establish whether these functions need to be available at all times. Then decide whether to make the header sticky, which items to retain, and how it should behave during scrolling. Not every website needs a sticky header.
First, Decide Which Functions Deserve to Stay Visible
In its 2021 article, NN/g recommends weighing the costs and benefits of a sticky header based on the website type, tasks, and content. A sticky header continuously occupies screen space, so do not add one simply because other websites have one.
- If it includes a login button, might users need to log in from any page?
- If it includes main categories, will users switch categories during a browsing session, or mostly stay within one?
- Are navigation, search, and tools needed often enough to justify continuously taking up reading space?
Also distinguish between navigation across the site and links that jump within a page. NN/g’s 2017 article advises against placing in-page links in a sticky header normally used for navigation. Users expect navigation to lead to new pages, so jumping to another part of the same page can conflict with that expectation.
Reduce Height, but Keep Text Readable and Buttons Easy to Tap
The taller the sticky header, the less space remains for content, so controlling its height is especially important on mobile devices. First ensure that text is readable and buttons are easy to tap, then remove excess vertical spacing. On desktop, too, avoid increasing the header’s height merely to enlarge the logo.
The 2021 article offers these guidelines for touch devices: tap targets should be at least 1 × 1 cm, and text should be around 16 points. The text size can be adjusted based on the typeface’s x-height and how easily its letterforms can be distinguished. These are the article’s design recommendations, not current standards that apply uniformly to all devices.
Keep It Stable and Be Careful About Hiding or Showing It on Scroll
In general, a sticky header should stay in place with as little animation as possible, rather than lagging behind and catching up after scrolling. If a large header must shrink during scrolling, the change should be immediate, quick, and smooth, without sudden disappearance or jumping.
A “partially sticky header,” which hides when users scroll down to read and reappears when they scroll up, can sometimes balance access to functions with reading space. However, the 2021 article rated its overall effectiveness as only moderate: scrolling up may simply mean users want to reread an earlier passage, not interact with the header.
If you adopt this approach, avoid an overly sensitive trigger that could make the header appear accidentally when a user’s hand is unsteady. The article recommends a slide-in animation of about 300–400 milliseconds. Once triggered, the header should slide fully into view even if the user stops scrolling upward, rather than getting stuck halfway.
Scroll Through the Page to Check Visibility and Content Obstruction
Do not evaluate only a screenshot of the top of the page. Different content areas will pass beneath the header as users scroll, so give it an opaque background color that differs from the main content’s background. This helps keep the header easy to distinguish throughout the page. A translucent header does not necessarily preserve usable reading space and may instead make the text underneath difficult to read.
- Scroll to different sections and check whether the header obscures content or distracts from it.
- Expand submenus and confirm that they, too, are clearly distinguishable from the content below.
- Check the height, text, and touch targets on small screens. Do not make the interface harder to use just to make it smaller.
Sticky headers: perspectives from across the web
If users mostly read within the same category, does the main navigation still need to be sticky?
Not necessarily. If users mostly stay within one category during a session, the main navigation may not deserve permanent screen space. If they frequently switch categories, sticky navigation may make access more convenient. Weigh the website type, tasks, and content, and also consider whether search and tools need to be available at all times, rather than making the header sticky simply because it contains these functions.
Is a header that appears when users scroll up suitable for reading-focused pages?
It is worth considering, but it is not a distraction-free compromise. This partially sticky header frees up space when users scroll down to read and makes access convenient when they scroll up. However, users may simply be reviewing earlier text, with no intention of bringing up the header. In 2021, NN/g rated its overall effectiveness as only moderate. If you use it, avoid an overly sensitive trigger that could make the header appear accidentally when a user’s hand is unsteady.
If an organization requires a large logo, how should the header behave during scrolling?
You can shrink a large header during scrolling, but the change should be immediate, quick, and smooth, at a speed close to normal scrolling. Avoid making the header suddenly disappear, jump, or startle users. This approach is for cases where a large logo must be retained at the top of the page. In general, keeping the header in place and minimizing animation helps avoid distraction, and screen space should not be wasted merely to enlarge the logo.
References
- Sticky Headers: 5 Ways to Make Them Betterwww.nngroup.com · 2021-04-04T16:00:00+0000 — Discusses: If users mostly read within the same category, does the main navigation still need to be sticky?; Is a header that appears when users scroll up suitable for reading-focused pages?
- Anchors OK? Re-Assessing In-Page Linkswww.nngroup.com · 2017-05-07T16:00:00+0000 — Source used in the article above.



