custom css being overridden by bootstrap css

前端 未结 8 1679
不思量自难忘°
不思量自难忘° 2020-12-02 23:33

I am using Bootstrap 3 and I have a table showing some data. in this table I have applied some javascript for conditional formatting, in the event that a condition is met, I

8条回答
  •  独厮守ぢ
    2020-12-02 23:57

    Use

    .table-striped > tbody > tr:nth-child(odd) > td.red {
        background-color:red;
        color:white;
    }
    

    to create more specific selector, or the !important keyword (as shown by Andrew)

    Alternitvaly, and probably best, you can create a custom bootstrap configuration, which not includes table styling (Uncheck Tables in Common CSS)

提交回复
热议问题