4 ms·
> For instance, you can't have a table be horizontally scrollable with the scrollbar fixed at the bottom and also have a fixed header. You might actually be ab
by csande17 5y ago
> For instance, you can't have a table be horizontally scrollable with the scrollbar fixed at the bottom and also have a fixed header.
You might actually be able to do that with position:sticky now: https://jsfiddle.net/0ydsve3x/1/ https://jsfiddle.net/0ydsve3x/1/
- benatkin 5y agoI couldn't get it to work with a table - only with having to scroll all the way to the bottom to find the horizontal scrollbar. Edit: hmm, it's working in the CodePen here: https://css-tricks.com/a-table-with-both-a-sticky-header-and-a-sticky-first-column/ https://css-tricks.com/a-table-with-both-a-sticky-header-and... I'll have to fully revisit what I was trying to do and see if I can get it working. Edit 2: Oh, I realized that I wanted the horizontal scrollbar to be sticky when it is an element taking part of the vertical space of a page, but more than a screenful. I found this that solves it but not for a table with a fixed header: https://amphiluke.github.io/handy-scroll/ https://amphiluke.github.io/handy-scroll/ To see what I'm talking about, go to the top of the demo, horizontally scroll, and note that horizontal scrollbar is shown when scrolling horizontally. Then click disable, and note that it isn't shown when scrolling horizontally, unless you go all the way to the bottom. Or, if you don't have a trackpad, you actually have to go all the way to the bottom to scroll it horizontally.