Hi @user.dev and welcome to the community
You could reduce all the left/right alignment rules to the code below, but I think that about the most reduction you could get.
tr :nth-child(2),
tr :nth-child(3),
tfoot th {
text-align: right;
}
tr,
tfoot :nth-child(2) {
text-align: left;
}
There’s another possibility to style entire columns, but only a few properties are supported (border, background, width, visibility). Therefore this wouldn’t work with text-align
, but maybe it’s helpful in another situation: <colgroup>
and classes on individual <col>
s inside.
I hope that helps,
Michael
PS: Your email address is visible in your post. It ended up in the optional “name” field of your profile. I recommend removing it.