Resizing height for td, th in Bootstrap

I can't seem to control the height of td and th in my bootstrap table or datatable.  Any help would be much appreciated!



Thank you!
Bob SchneiderCo-OwnerAsked:
Who is Participating?
Datatables have a Bootstrap CSS so when download Datatables you can select at
Step 1. Choose a styling framework = Bootstrap 3

Replace jquery.dataTables.min.css
by dataTables.bootstrap.css and  from the dataTables.bootstrap.css  edit the table CSS TH TD and this should be ok.

I also recommend the use of Responsive extension of Datatables which resized the table depending of the device and add a + button to display the value.
Chris StanyonCommented:
Your DataTable is styled in the jquery.dataTables.min.css file:

table.dataTable tbody th, table.dataTable tbody td {
   padding: 8px 10px;

Open in new window

Your main table is styled in the bootstrap.min.css:

.table td, .table th {
   padding: .75rem;

Open in new window

You look like you're trying to override it in your local_styles.css:

td, th {
    padding: 0;

Open in new window

... but CSS has a thing called specificity! This, along with the order of rules dictates which rule gets applied. The styles in your local_styles has a lower specificity than the others, so doesn't get applied. Basically, your rules apply to a general TH or TD wheres the other styles apply to specific TH and TD elements - namely those inside the .table class and the table.dataTable tbody element.

To override them in your own style, you need to use at least the same specificity. You may be tempted to use the !important keyword. Don't ... it's usually a hack.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.