I have an HTML table with a vertical scrollbar.
HTML:
<div className="table_wrapper">
<table>
<thead></thead>
<tbody className="add-insurance_table_tbody">...</tbody>
</table>
</div>
The UI looks like this:
CSS:
&_tbody {
height:calc(100vh - 350px);
overflow:auto;
overflow-x:hidden;
display:block;
width:100%;
font-size: 12px;
}
Now I want to increase the width of the table and add a horizontal scrollbar. I modified the above CSS and increased the width of the table.
A horizontal scrollbar appeared, however no scrolling happens.
The UI now looks like this:
Tried CSS:
&_tbody {
height:calc(100vh - 350px);
overflow:auto;
display:block;
font-size: 12px;
width:calc(100vh - 350px);
overflow-x: scroll
}