Skip to content Skip to sidebar Skip to footer

How To Writte Text In The Middle Of An Image Without Positioning And Z-index?

I am creating an email template and i need to writte text in the 'middle' of an image, but some email system's doesn't allow positioning, what can i use? My HTML:

I'd also move away from p tags, as they can render differently in different email clients.

Here's a JSFiddle of the finished code: https://jsfiddle.net/czxrp2hf/1/

Also, this link is quite helpful for finding out what CSS is supported in which email clients: https://www.campaignmonitor.com/css/


Solution 2:

All in all Natalie has right. If you want to try something like this:

<td valign="middle" background="your_image.jpg" width="100%" style="background-image: url(your_image.jpg)">
Your text here
</td>

should work in all major mailer (web and offline); except, as far as i know, Outlook 2007 and Outlook 2010.

Be aware that i put both the standard definition of background image AND the inline CSS one.


Post a Comment for "How To Writte Text In The Middle Of An Image Without Positioning And Z-index?"