How to apply text-align left in the first column and text-align right in the others
问题 I have a Table to style, how can I apply text-align:left; just for the first column and text-align:right; for the other columns? Here my Table example: http://jsfiddle.net/gianlucaguarini/hAv7P/ At the moment the text-align is left for all the columns. 回答1: You need to specify the following CSS: .table td, .table th { text-align:left; } #right, .table td + td, .table th + th { text-align:right; } Example here: http://jsfiddle.net/mWeYM/ You can read more about adjacent siblings CSS selector