Centered Image won't stay centered when sent | Community
Skip to main content
Parfitt_David
New Participant
May 25, 2017
Solved

Centered Image won't stay centered when sent

  • May 25, 2017
  • 2 replies
  • 36705 views

Hello everyone,

I created an email and I inserted an image in the body of the email.  I selected center aligned, and when the "Preview Email" is generated, it looks perfect.  However, when I send the sample, the image gets left aligned.  I am approving the draft before sending the sample, not sure if that is correct or not.

I cant seem to figure this out, any suggestions?

Thank you,

Dave

Best answer by Grégoire_Miche2

Hi David,

The simplest way to center an image in a way that works for every device is to create a table (1 column 1 row) and add the image in the table cell, then center the table.

<table align="center" style="margin: 10px auto;">

     <tr>

          <td>

               <img  src="..." />

          </td>

    </tr>

</table>

-Greg

2 replies

June 16, 2017

as a side note

A great way to test for Outlook rendering of emails is to open your email in Microsoft Word.

Word and outlook use the same render engine. it is not perfect but it can sometimes be useful when trying to trouble shoot.

have alook at this article

A Guide To Rendering Differences In Microsoft Outlook Clients

Tim

Parfitt_David
New Participant
May 26, 2017

UPDATE -- It seems to only be happening in MIcrosoft Outlook.  When I view on my iPhone's Mail app, it is centered.

Any ideas how to fix for Outlook?

Chris_Johnston
New Participant
May 26, 2017

You have to love outlook and its inability to ever render an email the way you want it to. We always run our emails through emailonacid to make sure that all email clients display it the way we want and outlook is always the one that gives everyone the most headaches.

In order to center an image, you need to use a table instead of "center align" and then put the image in the middle of a 3 column table. Keep in mind that the column width of the center column will need to equal the width of your image.

Parfitt_David
New Participant
May 26, 2017

Many thanks for your reply!  Interestingly enough, I did try a table. However, I only used a 1 column table, centered it on the page, and fit the image in the cell.  The entire table ended up left-aligning!

Regarding your statement:

Keep in mind that the column width of the center column will need to equal the width of your image.

Can I just make the center cell of the 3 column table big enough to hold the image?

Thanks Chris!!!