I am struggling to make a large table mobile-friendly using Bootstrap 4. The table can have up to 10 columns and 100 rows. I need a CSS solution that achieves the following:
- A fixed header with each column having the same width as its respective row
- An x/y scrollable body when the width/height exceeds the container size
- The header scrolls on the x-axis along with the table body
- Rows should never wrap, regardless of device screen size
- If possible, no JavaScript should be used
I haven't been able to find a suitable solution and would appreciate any help.
View the Jsfiddle example here
Table HTML
<table class="table table-hover table-striped table-bordered table-sm">
<thead>
<tr>
// Columns
</tr>
</thead>
<tbody>
// Rows
</tbody>
</table>