Link to home
Create AccountLog in
Avatar of jmckeon
jmckeon

asked on

How to keep a table header row stable while the user scrolls using CSS

I have a php page that pulls a query and displays the results in a table.

I want to have it so that the table's header row, containing the column names stays static while the user scrolls vertically but moves with the table when the user scrolls horizontally.

I know it's possible becaues I've seen websites that do this, just can't figure out how to do it myself.  I assume it's doen with the CSS Position attribute somehow.
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer