March 9th, 2003, 05:17 AM
CSS not loading in HTML Emails
Technology: PHP, HTML & CSS
I'm using PHP for my HTML newsletter. For layout formatting, i'm using CSS.
When i test my newsletter page in browser (IE6) it works fine, but when I email that same page to my hotmail a/c, CSS doesn't load.
I'm using following headers:
$headers .= "X-Mailer: PHP\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
I'm unable to find the problem.
March 10th, 2003, 11:07 AM
I'm not sure, but there doesn't seem to be anything in those commands about CSS. Are you incorporating the css in the mail document or is it an include?
March 10th, 2003, 01:20 PM
Yes I'm incorporating CSS in my mail document. IN the begining i was linking my css with my full domain path, then I incorporated in my document. But still its not working.
March 11th, 2003, 01:37 PM
ok guys, i found the solution.
I've putted all of css under body tags. Now CSS is loading perfectly BUT i must say regretful to HOTMAIL for the bad output of their layout.
I've took the snapshot, Check it out here snapshot
January 12th, 2004, 09:46 AM
Tried to have a look at your screenshot of what Hotmail has done to your HMTL based email with style under body tags..but your link is broken ....
Mines come out pretty weird, it appears my CSS has been applied to the hotmal page LOL!..
Does anyone know how to get css styles working in a HTML based email ??..Ive tried linking my stylesheet with full domain path, that doesnt work...ANd having style tags within body applies all my styles to the email and the surrounding web page of the HTTP mail client i.e. Hotmail