0

I don't really know how to approach this. I need to send some emails, with some design.

In my email.html.haml i have

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 

:css
  #backgroundTable {
    border-left: 1px solid #FFFFFF;
    / background: #FFFFFF url("\#{root_path + asset_path('page-bg.gif')}"); 
    background-image: url('../assets/page-bg.gif')
  }
...

I tryied both versions, but none seem to work. Chrome's developer console doesn't report any errors, like it does when i miss something in the image name or similar.

I have multiple images from css and html img tags, but the ones from css work.

Thanks

vladCovaliov
  • 4,333
  • 2
  • 43
  • 58
  • maybe this could help you understand more??? http://stackoverflow.com/questions/4918414/what-is-the-right-way-to-embed-image-into-email-using-rails – Nich Apr 27 '13 at 16:01
  • You should know that not every HTML tags works probably in email's template. – ecleel Apr 27 '13 at 21:02

1 Answers1

0

CSS for HTML emails must be inline, and many email clients cannot display all CSS entities.

MailChimp has a tool to help bring your CSS inline - http://beaker.mailchimp.com/inline-css

And Campaign Monitor has this great list of CSS elements and where they are supported - http://www.campaignmonitor.com/css/

samanthasquared
  • 1,847
  • 1
  • 18
  • 17