AOL adding spaces between images in HTML Emails

1k views Asked by At

I have built an email with tables for a client, but when I test it in AOL, extra padding is added between the images. It looks like a 3px space is being added to the right of each image... Here is my code:

    <table border="0" cellspacing="0" cellpadding="0" align="center" width="700" valign="top">
    <tr>
        <td>
            <img src="images/nav-gaming.jpg" align="left" style="display:block; vertical-align:bottom" width="104" height="33" border="0" /> <img src="images/nav-poker.jpg" align="left" style="display:block; vertical-align:bottom" width="104" height="33" border="0" /> <img src="images/nav-restaurant.jpg" align="left" style="display:block; vertical-align:bottom" width="102" height="33" border="0" /> <img src="images/nav-tanzibar.jpg" align="left" style="display:block; vertical-align:bottom" width="92" height="33" border="0" /> <img src="images/nav-events.jpg" align="left" style="display:block; vertical-align:bottom" width="82" height="33" border="0" /> <img src="images/nav-packages.jpg" align="left" style="display:block; vertical-align:bottom" width="96" height="33" border="0" /> <img src="images/nav-rewards.jpg" align="left" style="display:block; vertical-align:bottom" width="120" height="33" border="0" />
        </td>
    </tr>
</table>

Have I missed anything blindingly obvious? I have tested adding each image to a new td in the table, but that results in the same issue.

1

There are 1 answers

2
John On

It is always safer to put images into their own table cells:

<table border="0" cellspacing="0" cellpadding="0" width="700">
  <tr>
    <td>
      <img src="images/nav-gaming.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="104" height="33" border="0" />
    </td>
    <td>
      <img src="images/nav-poker.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="104" height="33" border="0" />
    </td>
    <td>
      <img src="images/nav-restaurant.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="102" height="33" border="0" />
    </td>
    <td>
      <img src="images/nav-tanzibar.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="92" height="33" border="0" />
    </td>
    <td>
      <img src="images/nav-events.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="82" height="33" border="0" />
    </td>
    <td>
      <img src="images/nav-packages.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="96" height="33" border="0" />
    </td>
    <td>
      <img src="images/nav-rewards.jpg" align="left" style="margin: 0; border: 0; padding: 0; display: block;" width="120" height="33" border="0" />
    </td>
  </tr>
</table>

Only exception would be if you are trying to float images (to float you need to remove display:block;). Floating can sometimes be problematic unless you have plenty of spare room in your table cell.