Smooth, scroll-aware sticky headers in pure HTML and CSS. No JavaScript needed for basic sticky behavior — just position:sticky and smart CSS.
The CSS property position:sticky handles basic sticky headers without a single line of JavaScript. For scroll-triggered background changes (transparent → solid), a small Intersection Observer script works — still no framework needed.
No JavaScript. The header stays fixed at top:0 while the page scrolls. Works in all modern browsers. Set z-index to keep it above page content.
A frosted glass effect — the most popular modern nav style. Semi-transparent background with blur creates depth without obscuring the scrolled content.
CSS checkbox hack for mobile menu toggle — no JavaScript. Or a tiny 5-line vanilla JS toggle. Both approaches avoid framework overhead.
Start with transparent background. Use Intersection Observer to add a class when user scrolls past the hero — changes nav to solid. Under 10 lines of JS.
| Pattern | CSS Only | JS Required | Best For |
|---|---|---|---|
| Always-sticky nav | Yes (position:sticky) | No | Documentation, long pages |
| Transparent → solid on scroll | Partial | Minimal (Intersection Observer) | Landing pages |
| Hide on scroll down, show on up | No | Yes (~15 lines) | Mobile-heavy sites |
| Mega menu dropdown | Yes (CSS hover) | Optional | E-commerce, marketing sites |
Commercial licence · No subscription · Instant download · Lifetime updates
Download All 180+ Templates — $35