Dev Man
Dev Man

Reputation: 71

Gmail Mobile not respecting image style `max-width: 100%`

I've been trying a bunch of different things to solve this, but nothing has made any difference. In our emails, we have an image in the footer. It is 456px wide, which is wider than both the device width and the parent div/ table (I've tried both).

I have made the image black to hide the content

This is in Gmail, testing on Chrome emulating iPhone 5/SE. The image has a max-width of 100% on it, but Gmail Mobile seems to remove this and insert a max-width of 852px, which is useless.

Might anyone know what the workaround is?

Upvotes: 2

Views: 2634

Answers (1)

gwally
gwally

Reputation: 3557

The css attribute max-width only has partial support in Android.

Without posting your html code, it's kind of hard to look at what you are doing and suggest an alternative.

Another question: Why in the world are you building emails that are 852px?

The best practice for email width is 600-800px. Beyond 600px, your email will not display correctly in many email clients, if for no other reason than that's the width of the viewing window for the email. Any wider than 600px, the recipient will have to scroll to view the email. As an example:

  • Gmail: 640px (starts hiding background color)
  • Outlook 2007: 600px
  • Outlook 2013: 550px
  • Yahoo: 650px

Good luck.

Upvotes: 1

Related Questions