Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > PHP + HTML E-mail : Using CSS

PHP + HTML E-mail : Using CSS
Thread Tools
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
Jun 17, 2003, 05:22 PM
 
Hello all,

I have written a small PHP script that will send an html e-mail to everyone in a MySQL database. The problem I have is that the CSS is not recognized in the e-mail client. Is this something that is not supported, or am I missing a certain step?

Please advise.

Jon31
www.jmarus.com - kicks by JM
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Jun 17, 2003, 06:08 PM
 
more info.
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
jon31  (op)
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
Jun 17, 2003, 06:14 PM
 
Umm.. I'm sending HTML e-mails, but when viewing the e-mail, the CSS formatting of the HTML does not show up in the e-mail. I had a direct link to the css style sheet. I want to use line-height and font-weight, etc.

Ideas?
www.jmarus.com - kicks by JM
     
Mac Elite
Join Date: Apr 2003
Status: Offline
Reply With Quote
Jun 17, 2003, 07:45 PM
 
why don't you have the css in the actual page instead of linking to it externally?
Technology, Computing & Creativity - www.clubmedia.com

Overflowing with Design Links - www.mixinvisuals.com

VW Sites.com - Links to the Volkswagen World - www.vwsites.com
     
jon31  (op)
Junior Member
Join Date: May 2003
Status: Offline
Reply With Quote
Jun 17, 2003, 07:50 PM
 
I've tried both ways, neither seem to work for me.

Could you post an example of an inline CSS? Say for added a border to a table.

thanks!
www.jmarus.com - kicks by JM
     
Dedicated MacNNer
Join Date: Feb 2001
Location: Manhattan
Status: Offline
Reply With Quote
Jun 17, 2003, 08:23 PM
 
dude, css won't work inline in most email apps...i believe it works in outlook, outlook express, most web based mailers, apple mail and probably some others (entourage,eudora?) but not aol and some older apps.

you're better off just using good old fashioned font tags and table layouts...
     
Forum Regular
Join Date: Nov 2001
Location: Toronto Canada
Status: Offline
Reply With Quote
Jun 21, 2003, 07:13 PM
 
as ameat says, outlook and outlook express in Windows embed internet explorer, and should do css exactly as expected.

Other email clients will behave unexpectedly, some won't accept css at all. That's the way it goes.

Also some web-based mail systems, yahoo for example, will parse html emails and remove things they find suspicious especially javascript. I can't remember how they treat css but I don't imagine it's pretty.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2