I try to obtain a sticky header on a html table, like in the picture
(by auto width I mean the last column should fill-in the remaining space)
My CodePen is here
but it seems the
tbody {
height: 300px;
overflow-y: scroll;
does not work...
I looked a bit more at the code and tried something to make it work, this is the what I came with. I hope that it's the solution that you're looking for!
To clarify a bit what I did. I added a
display:block
to the tbody of the table and gave the tr adisplay:block
andwidth:100%;