Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make bootstrap table as small as possible

I am trying to make bootstrap table as small as possible but based on the solutions of other questions, it is not working. I have tried width:auto !important or table-layout:auto !important but it is not working. Below is a sample of my table

enter image description here

like image 546
Noor Avatar asked Nov 18 '15 07:11

Noor


1 Answers

Though question is old but what I do to achieve this may help someone else. First you did not state version of bootstrap you are using. My solution worked for version four.

<table class="table table-hover table-responsive table-sm">
......
</table>

Adding class responsive and sm did the magic for me the table in my went as low as to the content

like image 127
Mukoro Godwin Avatar answered Nov 07 '22 10:11

Mukoro Godwin