-1

I cannot get the image to display... in an HTML e-mail. It does display in the browser. I have looked over similar posts and think I am missing something obvious. Trees/forest. Any ideas? TIA.

code:

<div style="margin-left:10px;background-image:url(http://info.enterprisedb.com/rs/enterprisedb/images/banner_img.jpg);background-repeat:repeat-x;width: 750px; height: 210px;">

testing2

</div>

I should add that this does display in some browsers, but when coming through in an e-mail it only works in some cases - Gmail is oK, Outlook is not.

For some reason it doesn't work in an certain e-mail programs, though its pretty basic HTML. I've been testing with sharklasers which also does not display the image. If I put it in the e-mail as a standard img link (not in the div) it displays fine in these e-mail programs.

HollyO
  • 11
  • 1
  • 1
    hmmm, i see it: http://jsfiddle.net/SWMRr/ – florin.prisecariu Jul 16 '14 at 11:12
  • Try wrapping the url in quotes i.e. `url('http://myImage.jpg')` – Mr. Polywhirl Jul 16 '14 at 11:13
  • Works for me in both IE and Chrome. – Jim Jul 16 '14 at 11:13
  • I tried adding the quotes just now. No change. for some reason it doesn't work in an Outlook e-mail. I've been testing with sharklasers which also does not display the image. If I put it in the e-mail as a standard img link (not in the div) it displays fine. – HollyO Jul 16 '14 at 11:15
  • Check this comparison list : https://www.campaignmonitor.com/css/ Good css in an email is very difficult to achieve because of many compatibilities issues between mail clients. – singe3 Jul 16 '14 at 12:11

2 Answers2

0

By default, OWA(Outlook Web App) will block some external content in HTML messages, such as pictures or sounds linked within the message. These links are hidden references (not the underlined kind that you click to activate) in the HTML source code to an external location on the Internet, such as a website. They are triggered when the message is opened or previewed, which prompts a download of the external content.

Reference : link

Sid M
  • 4,354
  • 4
  • 30
  • 50
  • No, that is not it. I of course select the option to 'download images' each time. If I put the image in just a simple tag, the image won't display until I 'download images'. At that point, this image will display from the tag but still not from the
    tag, that is why I suspected some of the
    settings.
    – HollyO Jul 16 '14 at 12:11
0

After looking here : Background images not working in Outlook 2007 and later , it appears that the only way to make background-image work in Outlook is to use it on the <body> tag. That may not be what you want but we can't do much about that, that's how Outlook is made :/

Community
  • 1
  • 1
singe3
  • 2,065
  • 4
  • 30
  • 48