I have been attempting to create a table where the last column cells (including the header) do not have a right, top, or bottom border. Despite my efforts in searching for solutions, I have not been successful in implementing what I have found.
You can see what I have tried in this fiddle: https://jsfiddle.net/prtome/taqge61v/
HTML
<table class="asktable">
<thead>
<th> col1</th>
<th> col1</th>
<th class="no-border-right"> col no border</th>
</thead>
<tbody><td>a</td><td>b</td><td>cell no border</td></tbody>
</table>
CSS
.asktable {
border-collapse: collapse;
border: 1px solid #ccc;
}
.asktable th {
padding: 4px 8px;
border: 1px solid #ccc;
}
.asktable td {
padding: 4px 8px;
border: 1px solid #ccc;
}
.asktable th.no-border-right{
border-top:0;
border-right:0 !important;
border-bottom:0;
}
I am unsure of where I may have gone wrong. Any help or guidance would be greatly appreciated. Thank you!