Although this was already answered, I just thought that I could find a solution that really worked for me if someone had such a problem in the future. This is really a combination of the above answers and something else that I found on the Internet.
The problem I encountered is related to Gmail and Outlook. According to the OP, the mobile content that I had would not be hidden in Gmail (Explorer, Firefox and Chrome) or Outlook (2007,2010 and 2013). I solved this using the following code.
Here is my mobile content:
<tr> <td style="padding-bottom:20px;" id="mobile"> <div id="gmail" style="display:none;width:0;overflow:hidden;float:left;max-height:0;"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td> <img src="imageurl" style="border:0;display:block;width:100%;max-height:391px;" /> </td> </tr> <tr> <td style="border-left-style:solid;border-left-width:1px;border-left-color:#d5e1eb;border-right-style:solid;border-right-width:1px;border-right-color:#d5e1eb;background:#f7fafd;padding-top:15px;padding-bottom:15px;font-family:Arial,Helvetica,sans-serif;font-size:22px;color:#1c1651;padding-left:10px;padding-right:10px;text-align:left;" id="mobiletext" align="left">We're now on Twitter</td> </tr> <tr> <td style="border-left-style:solid;border-left-width:1px;border-left-color:#d5e1eb;border-right-style:solid;border-right-width:1px;border-right-color:#d5e1eb;background:#f7fafd;font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#585858;padding-left:10px;padding-right:10px;text-align:left;line-height:24px;" id="mobiletext"><a href="#" style="text-decoration:none;color:#0068ca;">Follow us now</a> for some more info. </td> </tr> <tr> <td> <img src="imageurl" style="border:0;display:block;width:100%;max-height:37px;" /> </td> </tr> </table> </div> </td> </tr>
And here is the CSS:
@media only screen and (min-width:300px) and (max-width: 500px) { *[id=mobile] { width:300px!important; height:auto!important; display:block!important; overflow:visible!important; line-height:100%!important; } *[id=gmail] { display:block!important; width:auto!important; overflow:visible!important; float:none !important; height:inherit!important; max-height:inherit!important; }
Fixes for Outlook
So, as you can see from the above HTML code, wrapping the entire contents of these tags;
<!--[if !mso 9]><!--> <!--<![endif]--> ,
hides content for the versions of Outlook that I mentioned. For all other email clients display:none; works fine. I also saw that you can also use mso-hide:all to hide things for Outlook, but I thought it was a little easier than posting this inline code.
Fixes for Gmail
Now for Gmail, you can see that I created a "special" id called gmail , which I then applied to the div in <td> . I tried COUNTER other methods of using things like overflow:hidden inline and all sorts of other combinations, but this is what worked for me.
In short, wrapping the content in <td> in a <div> , which then contains overflow:hidden,width:0 , etc., then overwriting these styles, providing a div an id , in my case gmail problem for me.
In any case, maybe someone will find this useful in the future!