5 ms·
I needed "sticky" today for a table header that I want to keep visible as the user scrolls on the page... Works already in Safari, but alas only in Chrome Beta
by joakleaf 10y ago
I needed "sticky" today for a table header that I want to keep visible as the user scrolls on the page...
Works already in Safari, but alas only in Chrome Beta.
It is a lot simpler and more robust than the Javascript approaches I found.
- nitwit005 10y agoIt's also broken for tables in Firefox despite it reporting that it supports the style: https://bugzilla.mozilla.org/show_bug.cgi?id=975644 https://bugzilla.mozilla.org/show_bug.cgi?id=975644
- TylerH 10y agoposition-sticky is still only conditionally supported in Firefox' environment, and IIRC still only behind a flag.
- JadeNB 10y ago> I needed "sticky" today for a table header that I want to keep visible as the user scrolls on the page... Note that what you want is different from what the user wants. I am not alone in thinking that stickies never add value, no matter how convenient the designer thinks they are: https://alisdair.mcdiarmid.org/kill-sticky-headers https://alisdair.mcdiarmid.org/kill-sticky-headers .
- TheAceOfHearts 10y agoI generally agree with you, but I'd argue there's good use-cases for it. I hate it when sites feel the need to add a top and bottom navbar on my already small mobile device. But on the other hand, when I'm on my desktop using a web app that displays large tables (which is pretty common for me), it's really easy to confuse the column you're looking at. In cases like that, I like having the table headers visible at all time.
- JadeNB 10y agoI have never, mobile or desktop, seen any use case for it that I like, although I also don't do much mobile browsing; but it is fair to say that my personal preference shouldn't be what determines the future, or even the present, of web design! Despite that, I do think that it is fair to say that designers are much more enamoured of them than users are. (It's always refreshing how civil disagreements on HN can be. Thank you for your thoughtful reply!)