I am trying to make the columns header of my bootstrap table fixed so that when I scroll the data items of the table, the column headers don't move.
jsfiddle with example
I've tried the CSS below, however, it doesn't make the headers fixed and further messes up the entire look and feel of the table:
.table-fixed thead {
width: 97%;
}
.table-fixed tbody {
height: 230px;
overflow-y: auto;
width: 100%;
}
.table-fixed thead, .table-fixed tbody, .table-fixed tr, .table-fixed td, .table-fixed th {
display: block;
}
.table-fixed tbody td, .table-fixed thead > tr> th {
float: left;
border-bottom-width: 0;
}