HTML table column align right

Use width:100% on the table and the middle column.


<td style="text-align:right;">data1</td>


there are a few ways to do what you want. The most basic is to change the alignment directly in the tag

<td align='left'>data1</td><td align='right'>data1</td><td align='left'>data1</td>
<td align='left'>data2</td><td align='right'>data2</td><td align='left'>data2</td>
....

if you need to change something else (css style) you could create a class like .firstColumn and .secondColumn on each <td>

i tried to change directly the column but that doesn't work (HTML table colgroup element not working?