Change the color of the horizontal lines for the table table-condensed table in bootstrap

How to change the color of horizontal lines in a bootstrap table that has a class table-condensed?

+3
source share
3 answers

They use the property border-bottomfor tdand th- Link .. so the selector you can use is

.table.table-condensed tr th {
   border-bottom: 2px solid #f00; /* Change the color you want to set */
}

.table.table-condensed tr td {
   border-bottom: 1px solid #f00; /* Change the color you want to set */
}

This applies to all tables, so it would be better if you assigned a unique one classor idchanged the selector accordingly.


If you want, you can also customize your Bootstrap here .

+4
source

: , :

/* header */
.table > thead > tr > th {
   border-bottom: 2px solid red;
}
/* rows */
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
   border-top: 1px solid red;
}

. → http://jsfiddle.net/XazR4/

+3

Add a class to the table, for example <table class='table-condensed your_class'></table> , in your css add

table.your_class {
border:1px solid red;
}

Change red color to any color.

+2
source

All Articles