1. Sticky needs a scroll threshold
Scroll inside this stage. The dark heading sticks when it reaches top: 0.
Sticky section heading
Normal-flow item 1
Normal-flow item 2
Normal-flow item 3
Normal-flow item 4
Normal-flow item 5
2. Fixed follows the viewport
The orange note stays near the viewport corner while the document scrolls.
- Fixed elements leave normal flow.
- They can cover content, especially on small screens or at high zoom.
- Keep fixed controls small and preserve space around important content.
Sticky troubleshooting
- Set a threshold such as top: 0.
- Confirm there is enough content to scroll.
- Check which ancestor creates the scroll container.
- Inspect ancestor overflow when sticky seems inactive.