philipnewcomer/bootstrap4-card-tables

Suggestion for alignment of left and right padding

bzarzuela opened this issue · 1 comments

First off, thanks for the package.

Second, here's what I've been doing for my projects to fix the left and right alignment of the first and last td or th in a row in case anyone else wants an easy fix for the alignment with the card-header padding.

.card > .table tr:first-child th:first-child {
  padding-left: 1.25rem;
}

.card > .table tr:first-child th:last-child {
  padding-right: 1.25rem;
}

.card > .table tr td:first-child {
  padding-left: 1.25rem;
}

.card > .table tr td:last-child {
  padding-right: 1.25rem;
}

@bzarzuela thanks for the suggestion. I've incorporated it into version 1.2.0, although I added the padding to both horizontal sides of all cells, because I thought it looked a bit unbalanced to have different amounts of padding between the cells at the edges of the table vs. those not at the edge.