Hacker News new | ask | show | jobs
by SeanAnderson 503 days ago
There'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

2 comments

It'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
Thanks!