2017-02-16 44 views
0

說我想從刪除CSS選擇器propery而不更改源CSS?

.table { 
    width: 100%; 
    max-width: 100%; 
    margin-bottom: 20px; 

要覆蓋舉表類:

.table { 
    width: 100%; 
    max-width: 100%; 

而且我不希望重寫margin-bottom0,因爲我希望它保留什麼都其父將確定對於它,我怎麼能實現這一點,而不改變實際的bootstrap.css文件?

+0

我可能有這樣的誤解,但你總是可以創建和文檔** **後的bootstrap.css內鏈接custom.css文件和新的CSS文件中應用更改。 –

回答

-1

您可以將另一個類添加到html中的元素,並將margin-bottom設置爲零。

+0

「我不想將margin-bottom覆蓋爲0,因爲我希望它保留父項將爲其定義的值」 –

+0

在這種情況下,您可以將margin-bottom設置爲inherit – Sushant

1

試試這個

.table { 
    width: 100%; 
    max-width: 100%; 
    margin-bottom: auto; or margin-bottom: inherit; 
}