2016-03-23 13 views
0

Here're私のセレクター:ここCSSのオーバーライド、ブートストラップテーブル

table.table.table-striped.vitalStatisticsTable th, 
table.table.table-striped.vitalStatisticsTable td { 
    line-height: 1; 
    padding: .4rem; 
    background-color: red; 
} 

は私のマークアップです:私のルールは適用されません

<table class="table table-striped vitalStatisticsTable"> 
    <tr> 
    <th scope="row">Education</th> 
    <td>Post Graduate</td> 
    </tr> 
    <tr> 
    <th scope="row">Vices</th> 
    <td>Drinks socially</td> 
    </tr> 
    <tr> 
    <th scope="row">Race</th> 
    <td>White</td> 
    </tr> 
    <tr> 
    <th scope="row">Pets</th> 
    <td>George the turtle</td> 
    </tr> 
</table> 

が、私は私が間違ってやっている、本当にわからないんだけど。私は特異性を増やさなければならないと思っていました。私が理解しているように、私はブートストラップよりも具体的ですが、何かが足りないかもしれません。誰かがCSSのn00bを助けることができますか?これは動作します table.vitalStatisticsTable番目、 table.vitalStatisticsTableのTD :

+0

これは私を夢中にしています。 – user1019182

答えて

0

あなたはこれを使用することができます。すべてのクラスはセレクタで言及する必要はありません。

+0

私はうまくいきませんでした。しかし、提案をありがとう。 – user1019182

1

実際にはこれは動作します。私はCSSファイルに余分な "}"を持っていました。私は同時に恥ずかしくて、すべてを安堵しています。

関連する問題