HTML EMAILS & OUTLOOK 2007

Dan Howard 9th December 2008
Dan Howard

Coding an HTML email is fairly straight forward, getting it to display correctly in Outlook 2007 is another story. Microsoft have decided that it would be a really good idea to use Word's HTML rendering engine to display emails, I'm not entirely sure why they did this but they did, so we have to deal with it. To get your mailshot to display correctly, it's a bit like using really simple language when talking to someone who doesn't understand English very well...

1. Layout your design using tables

You have to go back in time and build your beautifully designed mailshot using tables. But, make sure you're not using any “rowspan” or “colspan” attributes, Outlook 2007 doesn't understand these and will break your layout. Fortunately there is a way around this, you can nest more tables within your table cells to create the same structure.

Lets say we need to create this:

Left column Right column (top)
Right column (bottom)
<!-- Standard method -->
<table>
  <tr>
    <td rowspan="2">Left column</td>
    <td>Right column (top)</td>
  </tr>
  <tr>
    <td>Right column (bottom)</td>
  </tr>
</table>

<!-- Without colspan or rowspan -->
<table>
  <tr>
    <td>Left column</td>
    <td>
      <table>
        <tr>
          <td>Right column (top)</td>
        </tr>
        <tr>
          <td>Right column (bottom)</td>
       </tr>
      </table>
    </td>
  </tr>
</table>

2. You can't use background images.

I am yet to discover a way around this one, but you can still use background colours. You just have to tell the designer that any selectable text needs to be on a plain background colour.

plain_bg.giflogo_bg.gif

3. Outlook 2007 doesn't understand CSS Floats

As mentioned above, your layout needs to be built using tables to avoid using CSS floats as this will certainly cause problems. This also applies to images within blocks of text, you must put them in their own table cell using nested tables as described above.

4. You must use very basic CSS Styling

External stylesheets will fail. Everything must been defined within <style> tags in the <head>, or inline using the “style” attribute.

<!-- This will not work -->
<head>
  <link rel="stylesheet" href="http://www.yourdomain.com/mailshot.css" />
</head>

<!-- This will work -->
<head>
  <style type="text/css">
    p {
      color:#999;
    }
  </style>
</head>

<body>

  <p style="color:#999">Lorem ipsum dolor sit amet.</p>

</body>

5. Bulleted lists must use the default bullets

If the designer produces something that resembles this...

fancy_bullets.gif

Send it back until it looks like this...

plain_bullets.gif

They aren't nearly as visually amazing but they work.

Today's Moral

As we all continue to move forward in web standards, with a common goal of making all code uniform so the data can be better understood, Microsoft seem to be moving in the other direction. They look to be making their platform using code unique to them, at the same time ensuring any developers have to go out of their way to make something work alongside their software.

Despite this, provided the developers are aware of this, and have a good knowledge of HTML code old and new, there are workarounds so we can ensure your mailshots look good on all the major email platforms.

Notes and Queries...

I simply don't understand why MS always tries to make everything so hard...

Thanks for the workarounds, I actually thought no CSS worked at all.
Esteban 30th December 2008
Your robot protection does nothing!
Commenteer 6th January 2009
Yeah, I ran into all issues discussed above and had to work around them all... while researching I found this helpful article on what CSS rules work in what e-mail clients: http://www.campaignmonitor.com/css/
shirley 30th January 2009
Thanks for the help, you rock.
Amy Tripp 24th February 2009
Could you give me tips on how to make anchor links work within html pages in outlook? They work perfectly in Thunderbird, Hotmail and Yahoomail, but Gmail disables them while Outlook points them outwards, trying to link to the source page (on my system) like it turns them to absolute links. All I want is for the user to click on a link on the page and jump to a different point on the same page without leaving that page at all much less opening up a browser window and going onine. Any help?
Alex Oloyede alexoloyede@gmail.com 3rd March 2009
Alex,

In my tests, I found that this works:

<a href=#anchor>Go to anchor</a>

<!-- bla bla bla -->

<div id=anchor>This is the anchor</div>

Excluding quotation marks and using the id of an element to link to.
Dan Howard 9th March 2009
I used in my email but outlook 2007 did not accept this. What could I use to separate my text in different line. spacer did not work
karen 19th March 2009
Does any one know a way to get animated Gifs to play in outlook??

Thanks
Roger B 2nd April 2009
 
ADD YOUR COMMENT

Are you human? (sorry to ask!)
Please answer this question in the box below:


THINK TANK
  • How to Reindex Your Website Quickly in a Search Engine
    "I think you are right Paul about reindexing. Effectively, good links are the first step to this goal. I have the same problem with this value site: http://www.referencefatburner.com/"
    Georges Junior
    How to Reindex Your Website Quickly in a Search Engine
    "Let's see if this helps with the problem i have been having. http://www.atomsolutions.org Sorry for spamming site"
    Adam
    Search Engine Optimisation (SEO) - No Secrets. No Mystery.
    " Hi everyone, starting, or have a small business? and want more customers? check out http://adwido.com a free site for uploading video ads for your business,they also have image uploads. The more sites you can link to the greater your market will be. They have a free link exchange as well. Don't get left behind, check us out for more info."
    Brian
    What Makes a Good E-Commerce Website?
    "Great Article Zoe"
    Rob Abdul Exommerce Expert
    Why is Content So Central to SEO?
    "I have used this nifty tool before with this current site: http://www.floridamlsconnct.com www.floridamlsconnect.com its great for tracking google ranks, and preparing and testing keywords and meta tag titles. "
    Using the Butterfly Effect
    "This story is a great read, every little bit does help in teh big scheme of things. I have done some updates to: http://www.floridamlsconnect.com www.floridamlsconnect.com and it is taking a while for it to be reindexed. "
    Jon
    How to Reindex Your Website Quickly in a Search Engine
    "I have the same problem with a site I have done updates to a while back: http://www.Floridamlsconnect.com www.floridamlsconnect.com and so far it is taking a bit of time for the site to become reindexed. Hopefully we will find a solution soon. "
    Jon
    How to Reindex Your Website Quickly in a Search Engine
    "Thanks, let me see if this works for me... http://www.joshuahowden.com"
    Charles Howden
    How to Reindex Your Website Quickly in a Search Engine
    "I have the same problem too. I registered a domain http://www.help4shoppers.com about six months back but I did not use it immediately and just left it there because my girlfriend was busy. She plans to use this domain to host her shopping guide and shopping tips forum. Shopping is an obsession of her's and believe me, she's really good at it. I did a site: but google came up empty, so it looks like my domain got de-indexed because I left it empty for too long?"
    JohnnyB
    Search Engine Optimisation (SEO) - No Secrets. No Mystery.
    "Hey starting, or have a small business? and want more customers? check out http://adwido.com Its a free site for uploading video ads for your business, they also have image uploads to. They have a free link exchange as well. The more sites you can link to the greater your market will be. Give it a try you wont be disappointed. We will send u in the right direction. "
    Brian

Get in touch

View our portfolio