RSS Forums RSS
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3282 | Replies: 18
Reply
Join Date: Jul 2006
Location: Deptford, London
Posts: 985
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 6
Solved Threads: 51
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: Using CSS in email? Or alternative?

  #11  
Apr 26th, 2007
Personally; I'd prefer to recieve plain text email.

The biggest problem you're likely to hit with email + CSS is linking... for the same reason pictures from remote locations don't load by default; linked CSS ( i.e. link href="" ) isn't going to load by default. There's a risk of someone operating spam emails that invoke cross site scripting attacks (webmail only) even attempt distributed denial of service attacks ( webmail or email applications ) if remote resources are requested upon opening an email.

The only other problem you might run into would be if email clients used their own stripped down parser/renderers; and if those renderers didn't implement CSS fully. For the reason I've already mentioned; CSS shouldn't be implemented fully in email clients; because there are CSS properties that can invoke downloads from remote locations ( background-image for example ).

Ideally though; an email client shouldn't block all CSS to prevent such occurances; it should block whatever module it is that fulfils remote downloads.

How exactly are you using CSS?

<span style="font-family:Arial;">inline?</span>

<style type="text/css">
span{font-family:Arial;}
</style>
<span>embedded?</span>

<link rel="stylesheet" type="text/css" href="http://yourdomain.dot/email.css"/>
<span>remote?</span>

The only other problem you might hit is rendering differences in email applications, if they use OS specific controls; those'll likely be the system's lowest common denominator (i.e. My old MS Outlook will use the same HTML rendering component as MSIE5; regardless of the fact Opera is my default browser ).

These pages might help; they are more related to HTML email in webmail clients. Still; CSS is more likely to be actively stripped out of webmail views as apposed to just being ignored, so perhaps they'll help you somewhat..

http://alistapart.com/articles/cssemail

http://www.campaignmonitor.com/blog/...ing_css_1.html
Last edited by MattEvans : Apr 26th, 2007 at 12:19 pm.
Plato forgot the nullahedron..
Reply With Quote  
Join Date: May 2005
Posts: 230
Reputation: nathanpacker is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
nathanpacker's Avatar
nathanpacker nathanpacker is offline Offline
Posting Whiz in Training

Re: Using CSS in email? Or alternative?

  #12  
Apr 26th, 2007
Well I've definitely decided against using CSS, so I'm not using it at all. Before that, I was using linked CSS. But thanks for the info on the HTML. I"ll look into that.
Reply With Quote  
Join Date: Oct 2006
Location: NY
Posts: 198
Reputation: Dukane is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 15
Dukane's Avatar
Dukane Dukane is offline Offline
Junior Poster

Re: Using CSS in email? Or alternative?

  #13  
Apr 27th, 2007
Why not add an option to the form so the user can select HTML or Plain Text?
It is very important to read this: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote  
Join Date: May 2005
Posts: 230
Reputation: nathanpacker is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
nathanpacker's Avatar
nathanpacker nathanpacker is offline Offline
Posting Whiz in Training

Re: Using CSS in email? Or alternative?

  #14  
Apr 27th, 2007
Originally Posted by Dukane View Post
Why not add an option to the form so the user can select HTML or Plain Text?

Good idea. Clean, easy. Just a little check box in the form. Nice. I'll have to give that a try.
Thanks.
Reply With Quote  
Join Date: Dec 2004
Posts: 1,592
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Using CSS in email? Or alternative?

  #15  
Apr 27th, 2007
The norm for HTML email is to use embedded style attributes in each tag.

<p style="font-family: Verdana;">...</p>
Reply With Quote  
Join Date: Jan 2007
Posts: 2,640
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 118
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Using CSS in email? Or alternative?

  #16  
Apr 27th, 2007
Too often the recipient of your email may not have control over his computer, because he is part of a business or university network that is controlled by systems administrators.

One idea is to send a plain text email, and provide a link in it to a formatted website.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 13,372
Reputation: jbennet is just really nice jbennet is just really nice jbennet is just really nice jbennet is just really nice 
Rep Power: 33
Solved Threads: 327
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Using CSS in email? Or alternative?

  #17  
Apr 27th, 2007
Quite a lot of websites (forums etc...) offer the user the choice of either HTML or PlainText. I suppose it wouldnt be that hard to set up.
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Join Date: May 2005
Posts: 230
Reputation: nathanpacker is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
nathanpacker's Avatar
nathanpacker nathanpacker is offline Offline
Posting Whiz in Training

Re: Using CSS in email? Or alternative?

  #18  
Apr 27th, 2007
Originally Posted by jbennet View Post
Quite a lot of websites (forums etc...) offer the user the choice of either HTML or PlainText. I suppose it wouldnt be that hard to set up.

No, not hard at all, I may do that actually. However, I really think that this form is going to be filled out so little, and some will not even supply an email address anyway, as it is optional, so I may just leave it as is. If it were going to a wider group of people, I would change it.

However, this discussion has been very educational and useful, as I do have a couple other sites with emails that will go out far more regularly, so plain text may be the way to go there.
Reply With Quote  
Join Date: Oct 2005
Location: Manchester, UK
Posts: 482
Reputation: pty is on a distinguished road 
Rep Power: 4
Solved Threads: 34
pty's Avatar
pty pty is offline Offline
Posting Pro in Training

Re: Using CSS in email? Or alternative?

  #19  
Apr 29th, 2007
I came across this post about CSS in email - it may be of some use.

Make sure you encode it as a multipart-mime though because some email clients don't like HTML
Note to self... pocket cup
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:50 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC