cssemailhtml-emailwindows-live

Target Windows Live Mail with specific css


Long story short, I'm making an HTML email (yeah, I know). I've got it to the point where it looks great in GMail, Yahoo Mail, Thunderbird and Outlook 2003 (haven't tested 07...). The only hiccup is Hotmail (Windows Live Mail). The fact that it doesn't support background images at all doesn't bother me with regards to my layout...it's that because of the layout, I need to set the width of the table to be a set value (550px) instead of a percentage (80%) or else my header image will just be floating in space and looks ugly.

So I now have two options as I see it - make a Hotmail-specific css rule to set the width as a static value (I don't know if this is possible) or to have my mailer template get modified on the fly based on whether or not the recipient belongs to '@hotmail.com'. I'd prefer the former rather than the latter.

Clarification: To keep it simple, imagine a 550px wide by 150px high div. It has a background image with repeat-x. Inside that div, I have an img which is 150px high and 550px wide. If the outer div is set to 80% of the viewport, it should expand to the left and thus expose the repeating background. This is what's expected. Since Hotmail doesn't show background images, it's just a blank white space.

Further clarification: Go here to see an example of what I mean.


Solution

  • In the end I had to modify my email right before sending based on a custom rules list (regex replace based on domain).