4 ms·
This article is about removing all fixed elements on a page. Not only do other elements catch strays, fixed isn't the industry standard way of making sticky hea
by SeanAnderson 2y ago
This article is about removing all fixed elements on a page. Not only do other elements catch strays, fixed isn't the industry standard way of making sticky headers in 2025!
- dredmorbius 2y agoFixed isn't the industry standard way of making sticky headers in 2025 What is? Flexbox? Or something else? (Not a FE dev, though I'm vaguely conversant in CSS, mostly by using it to fix site annoyances on my own via stylesheet management extensions such as Stylus.)
- SeanAnderson 2y agoThere's `position: sticky` now for headers. It has better ergonomics than fixed and it's nice than it's supported by all modern browsers. https://developer.mozilla.org/en-US/docs/Web/CSS/position https://developer.mozilla.org/en-US/docs/Web/CSS/position
- dredmorbius 2y agoThanks!
- nicbou 2y agoIt's a huge improvement for sticky sidebars that are only scroll within their parent element. For example, it's what I use on this page: https://allaboutberlin.com/guides/public-transit https://allaboutberlin.com/guides/public-transit