make table body scrollable bootstrap code example
Example 1: table fixed header
.tableFixHead thead th { position: sticky; top: 0; }
Example 2: how to set the scroll in bootstrap4 table body
table {
display: flex;
flex-flow: column;
width: 100%;
}
thead {
flex: 0 0 auto;
}
tbody {
flex: 1 1 auto;
display: block;
overflow-y: auto;
overflow-x: hidden;
}
tr {
width: 100%;
display: table;
table-layout: fixed;
}