1

I'm attempting to send out an HTML email from Thunderbird (latest versions), and I have an issue where when attempting to add a background-image, the url() is replaced with what looks like the beginning of a hyperlink...

An example would be:

#logo {
height: 427px;
width: 640px;
background: url("myimage.jpg");
}
...
<div id="logo"></div>

and when viewing the actual sent output I get:

background: url(<a class="moz-txt-link-rfc2396E" href="myimage.jpg">"myimage.jpg"</a>);

How can I do what I want? (I can't use an image tag in the email)

Tia!!

S.

EDIT: It seems that adding a BASE solves my issue, like:

<base href="http://www.myurl.com" />
...
background: url("./myimage.jpg")
Soch S.
  • 653
  • 6
  • 23

1 Answers1

0

That method will not work across all major email clients. There are 2 ways to put backgrounds in html emails that are widely supported (Mostly due to Outlook limitations):

VML (add to an element): http://backgrounds.cm/

Previous Body-tag Method (only works on whole email body): How make background image on newsletter in outlook?

Community
  • 1
  • 1
John
  • 11,985
  • 3
  • 45
  • 60