td background not auto-fit in google gmail client

Hi, I'm currently working on an eDM which needs a background image. I was using the td's background attribute. It looks fine in many email client but the android default email client that using auto-fit wrapped text but didn't scale my background at the same time. It broke my layout.
Does anyone know how I could fix this so that the background will fit the device width?

http://jsfiddle.net/4YtSn/

http://i839.photobucket.com/albums/zz314/hkhuman1/Screenshot_2014-01-18-21-04-56_zps2571ec08.png

Thanks.

zerocents zerocents, 2 years ago

You cannot have a scalable background image on gmail since it will block the background-size style you would need to contain the image to the width of the container. You need to stop gmail from resizing your table. This can be done by using min-width on a wrapper div.

<div style="min-width: 600px">

<table cellspacing="0" cellpadding="0" border="0" width="100%">
  <tr>
    <td align="center">

    <table cellspacing="0" cellpadding="0" border="0" align="center">
      <tr>
        <td width="600" align="left">

        <!-- Content here -->

        </td>
      </tr>
    </table>

    </td>
  </tr>
</table>

</div>

Michael Muscat

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098