I am trying to create an email template like following. I have used table. I am able to do everything except the image is not displayed at proper position. The images should be displayed in middle and on top of the container(see screen 1), but I am not able accomplished it. I have tried to provide negative margin
to container
, but gmail and other mail services are ignoring the negative margin.
Here's what I was able to accomplishd till so far.
The code is present here. Can anyone please help with this?
It is a good practice to use
inline style
while creating newsletter. Also outlook doesn't supportmargin negative
property.in your case the image is not appear center so you can use a inline style here 'style="text-align:center;"'.
Updated answer:
You can't use negative margin in html email. To mimic this, there are 2 ways to do it, the nested tables way and the more complex rowspan way:
Original answer:
For basic positioning:
Horizontally, use
align="left|center|right"
, vertically usevalign="top|middle|bottom"
Here is how to place an image center top of a table:
As I said:
Change you top row to:
check out the result - http://jsfiddle.net/562ux.
I've not tested this in a email Client, but as @Kheema Pandey says, you should try to use inline styles.