日々精進

新しく学んだことを書き留めていきます

bootstrapのtableクラスのborder colorを変更する

th, tdのborder-topで定義されているので、これを上書きする。 以下のようなclassを定義してtableタグに付ければ良い。

.my-table td {
  border-top: solid 1px <color> !important;
}

全tableのborder colorを変更するには以下のようにする。

.table > thead > tr > th{
    border:1px solid blue;
}
.table > tbody > tr > td{
    border:1px solid blue;
}

参考:

stackoverflow.com