I'm currently creating a responsive email template, and i have got to the testing stage and found out that Google remove any classes you add to your tables.
I have tried using an ID as well, but they strip that as well as any data-attributes I tried.
I read up about this alittle and came across a little trick to bypass this. I managed to get this to work, but not it seems to be broken again. This trick is as follows
<table id="container" lang="x-container" title="container" class="container" width="100%" cellpadding="0" cellspacing="0" style="max-width: 600px;margin: 0 auto;">
and the CSS would be
[title~=container] {
width: 100% !important;
}
but Google seems to strip that form my styling. Once i add * in front of the selector it stays in my css but my element doesnt seem to pick it up.
So my question is. What is the best way to target an element in gmail with media queries if you cant use ID or Class?