2012-01-03 117 views
0

我用下面的CSS的上邊框適用於各種表格的最後一子行:覆蓋CSS表格格式

.mytabs tr:last-child { 
border-top:1px solid #000; 
font-weight:bold;} 

現在我需要做的是覆蓋這種風格對於一個特定的表。我如何在一個特定的實例中覆蓋這種風格?謝謝。

+2

給特定表中的ID,並選擇ID? – BoltClock 2012-01-03 03:05:33

回答

3

你可以用一個自定義的DIV ID名稱例如<div id="customFormat"></div>或給表一個id <table id="customFormat"></table>

在CSS中,您可以指定自定義樣式只爲1臺。

#customFormat { 
border-bottom: 1px solid rgba(69,54,37,0.2); 
} 
+0

謝謝你。我現在就試一試,讓你知道它是如何工作的。 – DanielAttard 2012-01-03 03:16:17

1

給一類特定表或特定表的最後一行,並應用樣式

table.<specific_table> tr:last-child { 
...your style 
} 

.mytabs tr.<specific_row> { 
..your style}