jeudi 25 novembre 2021

Keep a horizontal table scrollbar always in view

I got a table on my webpage, and for low resolutions, it has a horizontal scrollbar. However, the scrollbar is fixed on the bottom of the table, and with many entries, it's a bit unnecessary to always scroll down, scroll left / right and scroll back to where we were again.

My table CSS looks like that:

th,
td {
    white-space: nowrap;
}
table {
    table-layout: auto;
}

How is it possible to have the scrollbar always appear at the bottom of the screen, if the bottom of the table is out of view? Most questions I've found were more like "how to always show the scrollbar, even if it isn't needed", but still only at the bottom of the table.

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire