Hi Jennie, thank you for the incredible post! I've looked everywhere to get sticky headers working and your code WORKED!
Quick question, my table needs to scroll horizontally as well but the sticky headers don't scroll horizontally when I scroll my content horizontally. What do you recommend I do?
Hi Ankit, I just see your message. And the post is a bit out-dated! Try this awesome easy approach for the modern browsers instead: css-tricks.com/making-tables-with-...
Scrolling horizontally at the same time would be tricky with my hacky approach as the header and table no longer syncs position.
While we can make the vertical "sticky" scrolling look more natural by applying simple animation on the header, horizontal scroll will not be that straight forward as I can imagine. In this case I will consider to use a special controlled scroll component which allows me to know control the scroll speed animation and apply the same animation to the header. Honestly it's not worth to add such heavy things.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Jennie, thank you for the incredible post! I've looked everywhere to get sticky headers working and your code WORKED!
Quick question, my table needs to scroll horizontally as well but the sticky headers don't scroll horizontally when I scroll my content horizontally. What do you recommend I do?
Hi Ankit, I just see your message. And the post is a bit out-dated! Try this awesome easy approach for the modern browsers instead: css-tricks.com/making-tables-with-...
Scrolling horizontally at the same time would be tricky with my hacky approach as the header and table no longer syncs position.
While we can make the vertical "sticky" scrolling look more natural by applying simple animation on the header, horizontal scroll will not be that straight forward as I can imagine. In this case I will consider to use a special controlled scroll component which allows me to know control the scroll speed animation and apply the same animation to the header. Honestly it's not worth to add such heavy things.