21
It is possible to add a behavior of overflow with scroll only in the tbody of a table and still not have to set fixed sizes in pixels, without having to separate the column header with the body, as seen in plugins that make available grids?
css for the overflow:
table.grid tbody {
overflow-y: scroll;
overflow-x: auto;
}
table:
<table class='grid'>
<thead> ... <thead>
<tbody>
...
</tbody>
<tfoot> ... </tfoot>
</table>
The intention is that even a table having records that exceed the limit of the area in which it is allocated, that it does not override this limit, but that the records are navigable through the scrollbar, as in grids of desktop systems, and who knows try to adaptI was going to be responsivel.
EDITION
Here’s an example of how to just add the css of overflow at the tbody doesn’t work:
As you can see in the image, the table is inserted in a div which has a size fixed height 200px. But the table continues to exceed this limit.
Good question, long ago I already spent some time trying something of the kind in a table I used,
thead
,tbody
andtfoot
, but I did not succeed and ended up having to create the headers the body and the footer of the table intable
separate, visually look the same, but if successful, I give a rollback in my project. + 1– Fernando Leal