-1

I am able to hide a table by using below code in Gmail, but same isn't working on Inbox by Google. Please review below code and help me to hide this table on Inbox by Google.

<!--[if !mso]><!--><table cellspacing="0" cellpadding="0" class="mobileShow" align="center" style="width:320px; background-color:#ffffff; max-height: 0px !important;  display: none !important; overflow:hidden; float:left; line-height:0px; mso-hide: all;">
<tr>
    <td style="width:85px;">
        <table cellspacing="0" cellpadding="0" style="width:85px; background-color:#f8f8f8;">
            <tr>
                <td style="width:85px; height:66px; background-color:#ffffff;"></td>
            </tr>
            <tr>
                <td style="width:85px; height:159px; background-color:#f8f8f8;"></td>
            </tr>
        </table>
    </td>
    <td style="width:150px; background:url(http://in.bmscdn.com/events/Large/ET00041490.jpg) no-repeat center center; height:225px; background-color:#adadad; border-radius:5px; background-size: 100% 225px;"><a href="https://in.bookmyshow.com/movies/half-ticket/ET00040972?&utm_source=ReviewBMS02Aug2016&utm_medium=email&utm_campaign=HalfTicket#trailer" target="_blank" style="text-decoration:none;"><img src="http://in.bmscdn.com/mailers/images/160720bmsreview/playbtn.png" style="margin:75px auto;display:block;" height="60" border="0" width="60"></a></td>

    <td style="width:85px;">
        <table cellspacing="0" cellpadding="0" style="width:85px; background-color:#f8f8f8;">
            <tr>
                <td style="width:85px; height:66px; background-color:#ffffff;"></td>
            </tr>
            <tr>
                <td style="width:85px; height:159px; background-color:#f8f8f8;"></td>
            </tr>
        </table>
    </td>
</tr></table><!--<![endif]-->
  • 3
    Is this an email that you are sending? you have not really explained your problem very well. If it is an email, You cant write Email code using modern CSS and HTML. You need to go back to HTML4 standards and CSS1 maybe CSS2 – Andrew Aug 02 '16 at 12:33
  • @Andrew you can write CSS emails easily enough, and some CSS3 rules can be applied, but the CSS needs to be **inline styles** not classes and id's. – Martin Aug 02 '16 at 13:04

2 Answers2

0

You really haven't submitted enough of an example for me to understand what's going on, but the fact that you're using !important suggests to me that you're not using inline styles. Try that out, emails are a pain to work with but inline usually works better.

0

This should cover all your bases (as inline CSS):

{
    display:none;
    font-size:1px;
    line-height:1px;
    max-height:0px;
    max-width:0px;
    opacity:0;
    overflow:hidden;
    mso-hide:all;
}

Edit (as inlined):

    <table style='display:none;font-size:1px;line-height:1px; 
              max-height:0;max-width:0;opacity:0;overflow:hidden;
              mso-hide:all;' cellspacing='0' cellpadding='0' border=0>
Martin
  • 22,212
  • 11
  • 70
  • 132
Ted Goas
  • 7,051
  • 1
  • 35
  • 42
  • 1
    I added an inlined example to your answer, saves me putting another answer in when yours fits the CSS that's needed. `:-)` – Martin Aug 02 '16 at 13:07