2012-07-02 62 views
6

我有一個表players 5列和40行。我想讓第二欄有width: 200px針對特定列在表

我無法弄清楚如何選擇表中的特定列。到目前爲止,我已經將其縮小到這個範圍,但是這對於表中的所有行都是如此。有人可以幫我設置特定列的列寬嗎?

table.players td 
{ 

} 
+0

沒關係。我想到了。我現在是個大男孩。 –

回答

12

這應該工作(除IE8及以下):

table.players td:nth-child(2) { width: 200px; }