943,776 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

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?

HTML and CSS Syntax (Toggle Plain Text)
  1. <span style="font-family:Arial;">inline?</span>

HTML and CSS Syntax (Toggle Plain Text)
  1. <style type="text/css">
  2. span{font-family:Arial;}
  3. </style>
  4. <span>embedded?</span>

HTML and CSS Syntax (Toggle Plain Text)
  1. <link rel="stylesheet" type="text/css" href="http://yourdomain.dot/email.css"/>
  2. <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.
Moderator
Featured Poster
Reputation Points: 522
Solved Threads: 64
Veteran Poster
MattEvans is offline Offline
1,091 posts
since Jul 2006
Apr 26th, 2007
0

Re: Using CSS in email? Or alternative?

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.
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 27th, 2007
1

Re: Using CSS in email? Or alternative?

Why not add an option to the form so the user can select HTML or Plain Text?
Reputation Points: 45
Solved Threads: 28
Posting Whiz in Training
Dukane is offline Offline
282 posts
since Oct 2006
Apr 27th, 2007
0

Re: Using CSS in email? Or alternative?

Click to Expand / Collapse  Quote originally posted by Dukane ...
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.
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 27th, 2007
0

Re: Using CSS in email? Or alternative?

The norm for HTML email is to use embedded style attributes in each tag.

HTML and CSS Syntax (Toggle Plain Text)
  1. <p style="font-family: Verdana;">...</p>
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Apr 27th, 2007
0

Re: Using CSS in email? Or alternative?

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.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Apr 27th, 2007
0

Re: Using CSS in email? Or alternative?

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.
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,505 posts
since Apr 2005
Apr 27th, 2007
0

Re: Using CSS in email? Or alternative?

Click to Expand / Collapse  Quote originally posted by jbennet ...
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.
Reputation Points: 10
Solved Threads: 0
Posting Whiz in Training
nathanpacker is offline Offline
234 posts
since May 2005
Apr 29th, 2007
0

Re: Using CSS in email? Or alternative?

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
pty
Reputation Points: 64
Solved Threads: 39
Posting Pro
pty is offline Offline
530 posts
since Oct 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: My website doesn't work on some computers.
Next Thread in HTML and CSS Forum Timeline: Cross-browser Check Request





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC