Image does not center when email sent despite html code that indicates that it should be [RESOLVED]

I’ve put a header image in a notification email, I’ve set it as centered in both the Image Gallery and in the notification text… and the html code indicates that it should be centered. But it arrives with the image set to the left and looks crappy…

Here’s the html for it:

<span style="font-weight: 400;"><img class="aligncenter size-full wp-image-40989" src="upload://rgU5fgwnSlVQN4gCFoPRv4WRUhP.png" alt="email header image that says that a QR code is within the email" width="350" height="100"></span>

What am I missing?

I’m trying to get this done for a launch on Jan 1… so any expedited help would be so greatfully appreciated!

Thanks!

Hi there,

Could you please share the HTML code you’ve used so I can test on my sandbox to further investigate to resolve it? Thank you

You’re using the WordPress CSS class of ‘aligncenter’ but the WordPress stylesheet is not included in the email, so that class won’t apply. You will need to add the inline CSS to center the image, like this instead:

<div style="text-align:center;">
    <span style="font-weight: 400;"><img src="upload://rgU5fgwnSlVQN4gCFoPRv4WRUhP.png" alt="email header image that says that a QR code is within the email" width="350" height="100"></span>
</div>

I added a div around the image so you can use the text-align rule. Give that a try and let us know how it goes.

1 Like

Thank you so much! Works!!

1 Like