Forum Moderators: not2easy
I could set up the messages so that all the style information is hard-coded, but for obvious reasons I'd like to use external CSS for this
are there any known workaround? Im using PHP's mail() function to send the messages btw :)
. If you do use an external file, you may save some bandwidth in delivery, but you'll lose it when the stylesheet is accessed on your server.
. You'll also lose all styling information if the email is viewed offline.
. Most webmail clients will strip out the <head> section of any HTML emails, so linking to the stylesheet in the usual place isn't going to work.
In my experience, embedding the stylesheet inside an HTML comment and placing the whole lot straight after the <body> tag works perfectly across all the major email apps and webmail clients. In fact the only client that has any problems with CSS in an HTML email is Lotus Notes. Even Outlook 97 can be catered for with a multipart-MIME email.
well the bandwidth isnt the most obvious reason now is it? Perhaps you forgot about the greatest power of CSS...the ability to change an entire site's look by editing 1 file? ;)
So if I change my site...I dont need to dig through my mail scripts and change them all....
thanks for yer help, ill give those suggestions a try