Email Development

Developing Emails for Cross-Browser, Cross-Client Compatibility: Part II

In Part I of this tutorial, I went through the steps of slicing the email within Photoshop before beginning the development. In this tutorial, I will go through the steps of modifying the exported HTML for text expandability and proper rendering in the majority of email clients.


Let's Get Started!

First, Open up your HTML file within your code editor of choice. I will be using Dreamweaver CS5, but other good options are Komodo Edit and Espresso (30 day free trial).

Here are the initial steps you should take care of:

Now we can start coding our email to be expandable and replacing image text with live text. When I refer to live text, I am referring to using web-safe fonts and text in replacement of an image that contains text that can be converted this way. Slices that contain graphics, photos, or illustrative fonts cannot be replaced with live text.

Images that do not contain graphical text should be converted to live text to aid in both deliverability and speed in which your email loads. Some spam filters will mark your email as spam if it does not have a "optimum" image to text ratio.

The screenshot below details which slices will be converted to live text:

Slices Converting to Live Text


Converting to Live Text in Action:


Expandability in Action:

In order to account for different email clients rendering text, line-heights, fonts, sizes, etc. differently, you have to make the areas around your live text expandable. To do this, you convert your image to a background color. Obviously this won't work for images that contain graphics, but more on that below.

  1. Go through each td tag on the left and right side of your email that has the dark grey background color. Ignore the slices that contain the blue ribbon for now. Convert each image to the background color, as we did for the live text areas, keeping the height and width of each.
  2. Now, go to the images with the blue ribbon that are next to your live text. The way we will make these slices expandable to the live text is we will ADD a background color to the td tag, but not remove the image. We are also going to align the image to the bottom so that if the text grows, the blue ribbon will be pushed down to follow the email. If this happens, the background color we have added to the td cell will also grow, preventing breaking.
This is how your table row should look like, containing the live text:
<tr>
<td bgcolor="#3d4852" valign="bottom">
<img src="images/11.gif" width="115" height="58" alt="" /></td>
<td bgcolor="#eaf4f7" valign="bottom">
<img src="images/12.gif" width="18" height="58" alt="" /></td>
<td colspan="3" bgcolor="#eaf4f7" width="552" height="58"><font face="Verdana, Geneva, sans-serif" size="5" style="font-size:27px;" color="#3994b5">A collection of textile samples</font></td>
<td bgcolor="#3d4852" width="115" height="58"></td>
</tr>

This is how your email will look if additional text is added and your email needs to expand. You can also see how if a different email client renders a font size slightly different, you won't be stuck with a white line break through your email, the ribbon would be pushed slightly down instead with the correct background colors.

Slices Converting to Live Text

Congratulations! You have coded your first email for expandability and cross-browser, cross-client compatibility!