While the table size using table-sm
is not responsive on its own, Bootstrap offers various classes that can be used to create responsive tables at specific screen widths through media queries.
If you need to control horizontal table scroll, there are responsive table classes available. However, these classes do not directly affect the size or spacing within the table cells.
An effective workaround could involve applying the standard table size styles to the .table-sm
class above a certain screen width using a media query like this:
@media (min-width:992px) {
.table-sm td, .table-sm th {
padding: .75rem;
}
}
You can see a live demo of this approach here: