Blog


Repurpose your Images for Mobile Email

10.19.2011

Read More Design Emails for Mobile Devices

Get connected with Email on Acid for up-to-date news and information on the subject of email design, development, and testing!

Email Testing RSS Feed Email Test on Twitter Email Preview on Digg Email CSS on Linked In Email Simulator on Stumbled Upon

Email Testing RSS Feed Email Test on Twitter Email Preview on Digg Email CSS on Linked In Email Simulator on Stumbled Upon

By acidadmin
August 18, 2009
 
 
 

The Mystery of Hotmail’s Strange Image Spacing

The Case of a Hidden Escape Character...

It's official, there's an invisible ghost haunting Hotmail and it had us spooked for over 3 days! OK so we don't mean Friday the 13th scary, but still scary to a programmer who doesn't see it coming!

Hotmail Style Preview

Turns out it isn't a ghost at all, it's a Microsoft supported escape character which Hotmail adds after every image. As you can rightfully assume, it doesn't lurk in IE but it does in Firefox, Safari, Opera, and Chrome. Since these browsers don't support the escape character, they read it as a special character without any horizontal width (our proverbial sheet over the ghost). That, matched with Hotmail's default CSS (line-height:normal;) creates a vertical space below every image - ah ha - mystery solved!

Whew! Moving on...
Once we figured it out, the next challenge was to simulate the issue in our Email Test. In the end, we are happy to report that we where successfully able to simulate the exact same spacing issues inside FF, Opera and Chrome no matter what size your images are.

This issue of course brings us back to our ongoing question: Should we support multiple web browsers when running our Email Test? So far, the obvious answer seems to be "yes" - considering the fact that results will clearly vary from one browser to the next when it comes to web based email clients. In fact, we feel inclined to simulate your email exactly the way it will look when viewed in the browser you are running your test in.

With all that said; at this time we recommend that you test your HTML/CSS email in the following order:

Step 1.) First, test your email in all the popular web browsers (IE 6, 7, 8, FF, Safari, Opera, and Chrome)
Step 2.) Then run your email through our Acid Test in Firefox for a few reasons...
             a. This will ensure that you see the infamous Hotmail ghost (if it applies to you)
             b. Firefox is the web browser that we have done most of our testing in to date

So what's the solution?

There are several possible work-arounds for this issue, be sure to check out our follow-up post: 12 Fixes for the Image Spacing in HTML Emails

Comments

Add style="display:block" to your images to solve this!
By yanwhite on 10/22/2009

Exactly, try what yanwhite just said.
By fluerasa on 11/29/2009

Worked for me too smile
By Platinum on 12/03/2009

i've been using the display:block hack for a while now, and it works flawlessly. the only bummer is i like to style my alt text (wrap your image in a span with inline css) and most of the time having it centered in its container would be ideal (i like my emails to be as pretty without images as they are with), but display:block floats everything to the left—even if you have your table cell and text aligned to the center. :(
but i'll live with that if it means no ugly spaces.
By ds on 06/06/2011

DS, we actually came out with a follow-up article with several additional workarounds that might work for you: 12 Fixes for the Image Spacing in HTML Emails
By Michelle Klann on 06/06/2011

Share Your Comment

Name:
Email:
Location:
URL:

Comment:

Remember my personal information
Notify me of follow-up comments?

Please enter the word you see in the image below:



Share/Save/Bookmark

If you haven't signed up yet, give our FREE online Email Test a try. Just drop in your code and we will instantly simulate your email in the most popular email clients!

Get connected with Email on Acid for up-to-date news and information on the subject of email design, development, and testing!

Email Testing RSS Feed Email Test on Twitter Email Preview on Digg Email CSS on Linked In Email Simulator on Stumbled Upon

Follow us on Twitter Become a Friend on Facebook Subscribe to our Blog Digg Us! Recommend on StumbleUpon