Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background-image css inside an html email - Gmail does not support

Tags:

I want to send html body email like below with background-image css to my users :

<div style='width:500px;height:1000px;background-color:black;background-image:url(http://upl0ad.org/images/mylogo.gif) repeat scroll left top;'>     My Content </div> 

but as the link below says google does not support background-image css!
http://www.campaignmonitor.com/css/

what can I do about that?

like image 450
SilverLight Avatar asked Nov 04 '11 20:11

SilverLight


People also ask

Does Gmail support background image?

Since Gmail has started loading images by defult they are now supporting background images.

Can you use background images in HTML emails?

You can add background images—with no coding required! To try it for yourself, sign up now for free. If you have an existing HTML email template, Campaign Monitor's “Bulletproof Background Images” has the code snippets you need to create email body background images.

Is background image supported in email?

The main issue with adding background images in emails is that they aren't supported across all email clients for security or other reasons.


1 Answers

Have you tried setting the background attribute of a table?

This is the recommended method detailed in the following Mailchimp blog post: Background Images and CSS in HTML Email.

Example (Tested in Gmail)

    <table background="https://www.google.com/intl/en_com/images/srpr/logo3w.png" width="275" height="95">         <tr>             <td>                 Email Content...             </td>         </tr>     </table> 
like image 58
jdavies Avatar answered Sep 24 '22 01:09

jdavies