I am styling a number of tables with twitter bootstrap and am using the .table.table-bordered
class. The default border color is gray, which is good for all my tables except one. For one table, I would like to change this border color to black and also make the lines thicker if possible. I am using less.
I've researched it and found the @tableBorder
variable which I can customize but changing this changes the color of all the tables.
I tried giving the table a class and putting this in the css file:
.differentTable {
@tableBorder: black;
}
...but that did not seem to change anything (not sure why).
Any help would be greatly appreciated.
@tableBorder
is a variable, not a property.
You can just add this to your CSS:
.differentTable, .differentTable td{
border-color: black;
}
The best way is
.table {
border: 0.5px solid #000000;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 0.5px solid #000000;
}
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