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.
You need to specify the following CSS:
.table td,
.table th
{
text-align:left;
}
#right,
.table td + td,
.table th + th
{
text-align:right;
}
You can read more about adjacent siblings CSS selector at 5.7 Adjacent sibling selectors.