#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    karachi pakistan
    Posts
    16
    Rep Power
    0

    CSS not loading in HTML Emails


    Platform: Windows
    Browser: IE6
    Technology: PHP, HTML & CSS

    I'm using PHP for my HTML newsletter. For layout formatting, i'm using CSS.

    Problem:
    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.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Ottawa
    Posts
    23
    Rep Power
    0
    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?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    karachi pakistan
    Posts
    16
    Rep Power
    0
    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.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    karachi pakistan
    Posts
    16
    Rep Power
    0
    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
  8. #5
  9. <blah>
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Location
    Melbourne, Australia
    Posts
    483
    Rep Power
    33
    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

IMN logo majestic logo threadwatch logo seochat tools logo