Consider the following HTML:
The best way to solve this issue is to do something like this.
Note the position: relative property in the "thead" and the "tbody' elements, those are important. So are the border-collapse and background-clip properties. Works with background-color on all and alternating rows.
table {
width: 100% !important;
border-spacing: 0;
border-collapse: unset !important;
thead {
position: relative;
left: -1px;
top: -1px;
tr {
th {
background-clip: padding-box;
border-top: 1px solid #737373!important;
border-left: 1px solid #737373!important;
border-right: none !important;
border-bottom: none !important;
&:last-child {
border-right: 1px solid #737373!important;
}
}
}
}
tbody {
position: relative;
left: -1px;
top: -1px;
tr {
&:last-child {
td {
border-bottom: 1px solid #737373!important;
}
}
td {
background-clip: padding-box;
border-top: 1px solid #737373!important;
border-left: 1px solid #737373!important;
border-right: none !important;
border-bottom: none !important;
&:last-child {
border-right: 1px solid #737373!important;
}
}
}
}
}