Home Resources Blog

Recently, Gmail has started behaving like Hotmail/Firefox by adding a margin around images. As you can guess, design and layout breakage ensues:

{title}

Based on our tests, this issue is affecting Gmail when viewed in IE7, Firefox 3.6, Google Chrome 4.1 (Windows), and Safari 4, Firefox 3.5 (Mac). Thankfully, there’s a simple fix.

The solution

You can fix this issue in all of the above clients by adding img { display: block; } to the <head></head> section of your HTML newsletter code. Campaign Monitor can automatically convert your CSS to inline styles, so once you’ve added this, we’ll do the rest:

{title}

{title}

Alternately, you can add it directly to your styles like so: <img src="https://www.campaignmonitor.com/assets/uploads/image.jpg" style="display: block;" />. The result is the same – fixed!

image

If you or your clients use email templates, this is a good time to give them a check and add img { display: block; } if necessary. You might want to run them through our design and spam tests, just to be certain. By adding this to your styles, you will be hitting two birds with one stone by preventing image rendering glitches in both Hotmail/Firefox and Gmail.

Many thanks to the folks on the forums who wrote in about this. Let us know in the comments below if this has affected you, or you’ve come across a similar quirk elsewhere… And don’t forget to test your campaigns!

This blog provides general information and discussion about email marketing and related subjects. The content provided in this blog ("Content”), should not be construed as and is not intended to constitute financial, legal or tax advice. You should seek the advice of professionals prior to acting upon any information contained in the Content. All Content is provided strictly “as is” and we make no warranty or representation of any kind regarding the Content.
Straight to your inbox

Get the best email and digital marketing content delivered.

Join 250,000 in-the-know marketers and get the latest marketing tips, tactics, and news right in your inbox.

Subscribe

See why 250,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free