Currently, I am experiencing an issue with aligning a table. My aim is to have a fixed header and a scrollable body for the table. To do this, I have aligned the table header and body using:
display: table-header-group
For the table body, I have applied the following CSS properties:
<tbody class="scrollablebody">
.scrollablebody {
display: block; // if I remove this, the scroll bar does not appear, but I need it
overflow-y: auto;
max-height: 200px;
}
However, when I apply the above CSS to the table body, all alignments become disturbed. Is there a way to achieve this without messing up the alignment? Thank you in advance.
[jsfiddle] (http://jsfiddle.net/saurabh07/7aj5fxmb/)