0

I've got a distant service that send html mails to subscribers that report activities, with some tables.

Some of users use Zimbra client as mailbox.

at the top of those mails I've got my style tag containing (not only):

<style>

table tr:nth-child(odd){
    color:white;
    background-color: #568f67;
    
}

</style>

The source of the email in Zimbra is as I've send it (so not truncated)

But if I dig into the html code of the windows (in firefox, chrome, edge) in dev console, it has been truncated as :

<style>

table tr:nth-{
    color:white;
    background-color: #568f67;
    
}

</style>

=> so without child(odd) ??

I've tryed to switch from nth-child to nth-of-type (which is truncated in nth-of-)

Is there something I can do for my Zimbra client user ?

I mean before adding a bunch of code to determine whether row are odd's one and simplify css selectors.

Don't know where to look, my googling doesn't lead anywhere (even chat**T)

note :

  • I've got several table with different color pattern for head and row
  • In my desktop client (thunderbird) everything is ok.
  • If i paste my style tag into the dev console of my navigator it revert to normal display
Ben
  • 13
  • 3
  • Does this answer your question? https://stackoverflow.com/questions/71498913/css-nth-child-selector-do-not-work-in-outlook-gmail/71504580#71504580 – Nathan Jul 21 '23 at 04:22
  • See also https://stackoverflow.com/questions/51045452/web-email-zebra-striped-table-impossible-on-gmail-hotmail-outlook – Nathan Jul 21 '23 at 04:24
  • thks for your reply Nathan, It may works, but imo it would be crazyer than calculating whether a row is an odd one and adding a class during table generation as my tables haven't in theory any size limitation. – Ben Jul 21 '23 at 08:47

0 Answers0