Make overflow-x: scroll sticky?

Hi there,

I have a large table that scrolls a long way down the page and is also very wide. I’ve enabled a horizontal scroll bar so users can scroll the table, but wanted to know if there is a way to make the scroll bar stick to the bottom of the screen?


If I understand you correctly, you have a horizontal scroll on the table box and a vertical scroll on a container/page that contains the scrolling table. Then the horizontal scroll will move with the table box.

To keep both scrollbars visible they both need to be on the same box.

Try wrap a div around the table and set the overflow to auto to get both scrollbars on the wrapper. Auto width and height will expand in available space, or give it a suitable size (the auto margin will keep it in horizontal center):

.table-scroller {
    margin: auto;
    width: auto;
    height: auto;
    overflow: auto;

Hope I’ve got your question right, welcome to post again. :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.