HTML code isn't working on Inbox by Gmail

688 views Asked by At

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]-->
2

There are 2 answers

0
Adam Trager On

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.

1
Ted Goas On

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>