I'm sending mails when performing some actions, and some of them contain an HTML table. I wanted to color 1 line out of 2 in the table and for that I'm using the rule below :
tr:nth-child(even) {
background-color: #c4409720;
}
In mailhog the output is perfect and it works but once looking at the email in Outlook or Gmail the rows are not coloured. Note that I don't know how many rows I'll have in advance since the mail template is populated with a list and a loop.
I guess the selector is not supported in those mail clients ?
So how could I achieve this in a way that will be understood by those mail clients ?
Thanks in advance !
:nth-child
support in email clients: caniemail.com/features/css-pseudo-class-nth-child – HTeuMeuLeu