13

What is wrong with this XHTML 1.1:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html><body><table>
  <colgroup>
    <col style="width: 10em; text-align: right;" />
    <col style="width: 10em;" />
  </colgroup>
  <tbody>
    <tr>
      <td>test1</td>
      <td>test2</td>
    </tr>
  </tbody>
</table></body></html>

The problem is that test1 is not aligned to right, as it is supposed to be.

yegor256
  • 102,010
  • 123
  • 446
  • 597

2 Answers2

10

Answered here already. Basically text-align doesn't apply to columns.

Community
  • 1
  • 1
andyb
  • 43,435
  • 12
  • 121
  • 150
2

Perhaps, this would help you: http://www.w3.org/TR/CSS2/tables.html#columns

Lyubomyr Shaydariv
  • 20,327
  • 12
  • 64
  • 105