I made an HTML email which is displayed perfectly fine in Gmail, but with some strange hotmail errors. I have the following html
<?php
[..]
$mailTxt = "<div style=\"font:11pt/22pt Arial;color:black;width:100%;background:black;text-align:justify;\">
<div style=\"height:150px;background:black;display:table;\">
<div style=\"display:table-cell;width:160px;vertical-align:top;\">
<img src=\""._BASE_URL."/inc/images/SingleDays-Mailing-Logo.jpg\" style=\"margin:25px;\">
</div>
<div style=\"display:table-cell;vertical-align:top;\">
<h1 style=\"font:19pt/22pt Arial;letter-spacing:-0.5pt;color:#cc2439;padding-top:40px;\">SingleDays Nieuwsbrief, ".$_POST['date']."</h1>
</div>
</div>
<div style=\"background:white;margin:0 25px;padding:25px 10%;border-bottom:solid 1px #eee;\">
<h2 style=\"font:17pt/22pt Arial;letter-spacing:-0.5pt;color:#cc2439;text-transform:uppercase;\">".$_POST['s1']."</h2>
<p style=\"text-align:justify;\">".$_POST['t1']."</p>
</div>
<div style=\"display:table;background:white;margin:0 25px;border-bottom:solid 1px #eee;\">
<div style=\"display:table-cell;padding:25px;border-right:solid 1px #eee;width:50%;\">
<h2 style=\"font:15pt/22pt Arial;letter-spacing:-0.5pt;color:#cc2439;\">".$_POST['s2']."</h2>
<p style=\"text-align:justify;\">".$_POST['t2']."</p>
</div>
<div style=\"display:table-cell;padding:25px;width:50%;\">
<h2 style=\"font:15pt/22pt Arial;letter-spacing:-0.5pt;color:#cc2439;\">".$_POST['s3']."</h2>
<p style=\"text-align:justify;\">".$_POST['t3']."</p>
</div>
</div>
<div style=\"display:table;background:white;margin:0 25px;\">
<div style=\"display:table-cell;padding:25px;border-right:solid 1px #eee;width:50%;\">
<h2 style=\"font:15pt/22pt Arial;letter-spacing:-0.5pt;color:#cc2439;\">".$_POST['s4']."
<p style=\"text-align:justify;\">".$_POST['t4']."</p>
</div>
<div style=\"display:table-cell;padding:25px;width:50%;\">
<h2 style=\"font:15pt/22pt Arial;letter-spacing:-0.5pt;color:#cc2439;\">".$_POST['s5']."</h2>
<p style=\"text-align:justify;\">".$_POST['t5']."</p>
</div>
</div>
<div style=\"background:black;color:white;\">
<p style=\"margin-left:25px;\">Je ontvangt deze nieuwsbrief omdat je aangegeven hebt deze te willen ontvangen. Via <a href=\""._BASE_URL."/unsubscribe/".md5($receivers[$i])."\" style=\"text-decoration:underline;color:#cc2439;\">deze link</a> kun je je weer uitschrijven.
</div>
</div>";
[..]
?>
This works perfectly fine in Gmail, but the problems occur in Hotmail (and since i’m working on an Apple without Office i can’t even check outlook..)
First of all, all my headings turn out green. I already tried an color:#cc2439 !important; but without any result, still green
Besides that are the margins handled incorrectly (which should be supported)
Problems seem pretty basic to me, so i was wondering if someone knows an easy solution I don’t have any clue how to solve the color issue.
EDIT:
Solved the color issue by replacing the heading elements with a paragraph. Apparently Hotmail’s stylesheet overrules user styled headers
A few tips:
1 – Campaign monitor has a good guide on what’s supported on different mail clients.
http://www.campaignmonitor.com/css/
2 – Exact Target (you have to pay) has an excellent service where it automatically tests your email on a variety of clients and makes screen-shots of them all, which you can view online or download as PDF.
http://www.exacttarget.com/