I use php to create a table with data that is read from a database. I have managed to align correctly fields inside the columns of a table by using a global style directive as follows:
<style>
td:nth-child(1){text-align:left;} td:nth-child(3){text-align:left;} td:nth-child(6){text-align:right;} td:nth-child(7){text-align:right;} td:nth-child(8){text-align:right;} td:nth-child(9){text-align:center;}
</style>
The problem is that now I need to use a subtable inside a field of the main table, so I don't know how to do it.
The best option would be to be able to define the style locally for each different table.