Does anyone know a vanilla way of making the body of a table scrollable using only html and css?
The obvious solution
tbody {
height: 200px;
overflow-y: scroll;
}
does not work.
Wouldnt this be the obvious use of tables?
am I doing something wrong?
You need to declare a height first, else your table will expand to the according with of it's content.
table{
overflow-y:scroll;
height:100px;
display:block;
}
EDIT: after clarifying your problem i edited the fiddle: check out this Example or that way. It's rather hacky and not quaranteed to work crossbrowser but might work for your case.