how to remove horizontal border of a table using bootstrap? I want to keep only vertical border. Here is my code:
<table class="table table-bordered">
<thead>
<tr>
<th>Home</th>
<th>Client</th>
<th>Setting</th>
</tr>
</thead>
<tbody>
<tr>
<td>data1</td>
<td>data2</td>
<td>data3</td>
</tr>
<tr>
<td>data1</td>
<td>data2</td>
<td>data3</td>
</tr>
<tr>
<td>data1</td>
<td>data2</td>
<td>data3</td>
</tr>
</tbody>
</table>
Never use !important as it is a bad practice. The solution for your question is
.table-bordered > tbody > tr > td,
.table-bordered > thead > tr > td,
.table-bordered {
border-bottom: 0;
border-top: 0;
}
All the horizontal borders are gone and only the vertical borders are left.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With