I have two CSS rules with different selectors which I want to combine. Both rules have the same CSS properties. The first selector targets th elements, and the other selector targets td elements:
.MyClass th:nth-child(n+6):nth-child(-n+9){
text-align: right;
}
.MyClass td:nth-child(n+6):nth-child(-n+9){
text-align: right;
}
I suppose it is possible to combine these two rules, but how?
EDIT
Okey, I know I put my answer in wrong. My question is a little to simple!
I already was aweare of putting them together with a comma like this:
.MyClass th:nth-child(n+6):nth-child(-n+9),
.MyClass td:nth-child(n+6):nth-child(-n+9){
text-align: right;
}
But what I actually wanted to know is how to only do a single selector of :nth-child(n+6):nth-child(-n+9).