How can I use HTML/CSS to add a background image to an email?

0

I've been trying to get background images working in my Email HTML and have had no luck. I'm using Outlook 2007 to test my HTML code.

My method is:

  • Create my .htm file
  • Save it in %appdata%\Microsoft\Signatures
  • Create a New email and set that HTM file as my signature

So far, all my attempts at adding a background image have failed and I'm beginning to think it's not possible. Any ideas?

Brett

Posted 2010-10-12T07:27:12.460

Reputation:

This is the wrong platform for such a question. This should be moved to http://superuser.com/

– Sean Patrick Floyd – 2010-10-12T07:38:24.753

1It's a coding question. HTML/CSS. Not an Outlook question. – None – 2010-10-12T07:49:32.717

Definitely not a superuser question. – annakata – 2010-10-12T07:53:14.067

Answers

1

Here is an interesting url that should help you understand what HTML features are supported by various webmails, and by extension, desktop clients:

http://www.webknowhow.net/dir/HTML/CSS/0607CSSSupportineMail.html

SirDarius

Posted 2010-10-12T07:27:12.460

Reputation: 146

Thanks for the link. Unfortunately, it only talks about web-based mail readers. Not mention of Outlook. – None – 2010-10-12T07:55:09.410

@Brett, I think anything that's described to work on that page should also work on Outlook, unless it's really non standard – None – 2010-10-12T08:00:04.640

1

Quite a complete resource here:

http://msdn.microsoft.com/en-us/library/aa338201.aspx

Hope it helps!

Trufa

Posted 2010-10-12T07:27:12.460

Reputation: 207

0

http://kb.mailchimp.com/campaigns/design/limitations-of-html-email provides some updated information on this topic. Even if you're using inline CSS to style your e-mail, certain html elements may be finicky in a client-side app, but appear perfectly fine in a browser based inbox like Gmail or Yahoo. Why was this question migrated to Super User?

Dave Quarick

Posted 2010-10-12T07:27:12.460

Reputation: 1

0

Try giving inline css Or As far as i know, to use html emails, you could use tables and place your image inside a td. Hope this helps.

noobcode

Posted 2010-10-12T07:27:12.460

Reputation:

I've tried using inline CSS as well as wrapping it in <style></style> tags. you could use tables and place your image inside a td - Are you talking about creating an image border around the text (like a lot of email newsletters)? I don't really understand this, sorry. – None – 2010-10-12T07:51:25.130

No he's talking about using tables to structure the layout of your email and then you can slice a background image into smaller cell images and apply them as actual <img> tags or backgrounds on the <td>. Basically, CSS and emails don't play well together at all and doing stuff like this like it's the 90's is the only realistic way to get HTML emails to work consistently because outlook's rendering is very much still from the 90's. – annakata – 2010-10-12T07:56:39.300