Why it follows
Without it, users scroll back up for search or menus; a sticky header removes that cost, keeping the next path close (Pirolli & Card, 1999). Laubheimer (2021) says it should be small, high-contrast and unobtrusive. Apps often shrink it on scroll like Material's top app bar (Google, n.d.).
The cost on small screens
Small screens show less (Kim et al., 2015), and headers eat reading space, especially in landscape. Many sites hide headers on scroll down and reveal them on a slight scroll up. The top is also far from thumbs (Fitts, 1954), so frequent actions may belong in bottom navigation.
Covered content and accessibility
position: sticky (MDN, n.d.) is easy, but anchor links often land headings under the header; scroll-padding-top fixes it. WCAG 2.2 (W3C, 2023) 2.4.11 forbids obscured focus, and 1.4.10 means zoomed headers must not fill the screen. Add safe area padding on notched devices.
FAQ
- Are sticky headers always good?
- They help on long pages needing frequent returns to key features; hide or shrink them on short or reading-focused screens.
- How do sticky and fixed differ?
- Sticky stays in flow until a threshold; fixed is pinned from the start and removed from flow.
Sources reviewed: 2026-10-27
References
- Laubheimer, P. (2021, April 4). Sticky headers: 5 ways to make them better. Nielsen Norman Group. Five ways to improve sticky headers.
- Google. (n.d.). Top app bar. Material Design 3. Top app bar scroll behaviour.
- MDN Web Docs. (n.d.). position. Mozilla. sticky versus fixed.
- Kim, J., Thomas, P., Sankaranarayana, R., Gedeon, T., & Yoon, H.-J. (2015). Eye-tracking analysis of user behavior and performance in web search on large and small screens. Journal of the Association for Information Science and Technology, 66(3), 526–544. Small screens show less content.
- Pirolli, P., & Card, S. (1999). Information foraging. Psychological Review, 106(4), 643–675. Lower navigation cost.
- Fitts, P. M. (1954). The information capacity of the human motor system in controlling the amplitude of movement. Journal of Experimental Psychology, 47(6), 381–391. Top buttons are far from thumbs.
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. Criteria 2.4.11 and 1.4.10.
