| | |
Using CSS in email? Or alternative?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I have a script sending out an email to some users, and I was going to try to use CSS to format it, until I found out it's nearly impossible. So I have 2 questions.
1. Is it possible to use CSS in email, and ensure everyone can read it? (This would be the best option)
2. If option #1 is not possible, i need a resource or some info somewhere to show me how to do some af the things that CSS can do, only in plane jane HTML. For instance, a bit of CSS might say:
But I can't quite get the same effect using plane HTML. I mean the font is easy enough, but I can't figure out how to get the font size the same. I guess I'm just really amature at HTML. Also changing the hover color on a text link. And changing the character spacing, so I can make the lettering a little closer.
Ok that's enough. I think you get the point. To be honest, I'm trying to "copy" a CSS template in an email I'm sending, but haven't been successful in using CSS in email.
Any suggestions would be helpful.
1. Is it possible to use CSS in email, and ensure everyone can read it? (This would be the best option)
2. If option #1 is not possible, i need a resource or some info somewhere to show me how to do some af the things that CSS can do, only in plane jane HTML. For instance, a bit of CSS might say:
HTML and CSS Syntax (Toggle Plain Text)
font: 70%/1.5 Verdana, Tahoma, Arial, Helvetica, sans-serif;
But I can't quite get the same effect using plane HTML. I mean the font is easy enough, but I can't figure out how to get the font size the same. I guess I'm just really amature at HTML. Also changing the hover color on a text link. And changing the character spacing, so I can make the lettering a little closer.
Ok that's enough. I think you get the point. To be honest, I'm trying to "copy" a CSS template in an email I'm sending, but haven't been successful in using CSS in email.
Any suggestions would be helpful.
•
•
•
•
I have a script sending out an email to some users, and I was going to try to use CSS to format it, until I found out it's nearly impossible. So I have 2 questions.
1. Is it possible to use CSS in email, and ensure everyone can read it? (This would be the best option)
Many email systems (such as Pine) don't understand HTML or CSS. They will print your code in the body of the email, making the recipient mad.
Remember that many people don't have a choice of what email client they have to use. It is decided for them by bosses, universities, or ISPs. And some spam filters go "BLEAUGH!" when they see HTML, and throw the email in the spam box.
•
•
•
•
2. If option #1 is not possible, i need a resource or some info somewhere to show me how to do some af the things that CSS can do, only in plane jane HTML. For instance, a bit of CSS might say:
HTML and CSS Syntax (Toggle Plain Text)
font: 70%/1.5 Verdana, Tahoma, Arial, Helvetica, sans-serif;
But I can't quite get the same effect using plane HTML. I mean the font is easy enough, but I can't figure out how to get the font size the same. I guess I'm just really amature at HTML. Also changing the hover color on a text link. And changing the character spacing, so I can make the lettering a little closer.
HTML and CSS Syntax (Toggle Plain Text)
<span style="font: 70%/1.5 Verdana, Tahoma, Arial, Helvetica, sans-serif;">Hi Larry, how are you.</span>
When I get an email that looks like that, it goes in the recycling bin.
Caveat Emailor.
Email is not for nice formatting. Email is for sending letters to friends. And especially email is not for advertising. I love blasting spam advertising into oblivion with my DELETE button.
Keep emails to text and attachments.
Last edited by MidiMagic; Apr 23rd, 2007 at 1:20 am.
Daylight-saving time uses more gasoline
Thanks for the reply. Sounds like you have had some nasty experiences with HTML email. By the way, the email I'm sending is not an advertisement. It is in response to a form a user fills out on my site, with information they requested. I simply wanted to give it to them in a way that is nice and professional looking.
It can't be that uncommon. I Receive HTML-formatted emails all the time. In fact, Daniweb, which I consider to be the gem of information on this type of thing, sends HTML emails for everything, don't they? And besides, I tested most of the major email services that people use with my HTML email, Gmail, Hotmail, Yahoo, AOL, and they all seem to be taking it fine.
I think the only problem I would really have with HTML email would be users who specifically turn off HTML email, wouldn't it?
I appreciate your opinion. I have given up trying to us CSS in email. However, I would like to hear something encouraging about HTML email, as it seems to be used all the time, so it can't be that bad! (Plus, I think I've finally achieved the look I want without using CSS.) If I get enough opinions that HTML email is really that bad, I won't be completely opposed to going back to just a text email.
But I do have to say that this email will not be going to hundreds of people. The form will most likely be filled out by no more than one or two people a month, if that.
It can't be that uncommon. I Receive HTML-formatted emails all the time. In fact, Daniweb, which I consider to be the gem of information on this type of thing, sends HTML emails for everything, don't they? And besides, I tested most of the major email services that people use with my HTML email, Gmail, Hotmail, Yahoo, AOL, and they all seem to be taking it fine.
I think the only problem I would really have with HTML email would be users who specifically turn off HTML email, wouldn't it?
I appreciate your opinion. I have given up trying to us CSS in email. However, I would like to hear something encouraging about HTML email, as it seems to be used all the time, so it can't be that bad! (Plus, I think I've finally achieved the look I want without using CSS.) If I get enough opinions that HTML email is really that bad, I won't be completely opposed to going back to just a text email.
But I do have to say that this email will not be going to hundreds of people. The form will most likely be filled out by no more than one or two people a month, if that.
Last edited by nathanpacker; Apr 23rd, 2007 at 1:17 pm.
It's not bad, if you can get it to render legibly on non-html systems. Minimize tag use.
My experience has been the following:
- Most UNIX and VMS email systems (e.g. Pine) don't parse the HTML. They display the code as text. Most unix terminals use monospace fonts. This includes ALL systems which are connected to in a Telnet-type environemnt.
- Many institutions (including colleges) take administrator privileges away from users, and do one of the following to emails containing HTML:
- Turn off HTML parsing (you see the HTML as text)
- Render the page as plain text by sstripping all tags out of the code. But you see the & codes instead of the characters they make.
- Throw emails containing HTML into spam boxes.
- Throw the HTML email away entirely, often without notifying the user that he didn't get it.
They do this to prevent malicious software from getting into their systems.
- Some system-wide firewalls strip HTML code out of the incoming email data stream, leaving plain text.
- Some legacy browsers (such as Lynx, used on DOS systems), and emailers render only a few tags. The other tags are just deleted from the text without formatting it. Fonts are meaningless on such browsers, since they use the CGA text screen.
My experience has been the following:
- Most UNIX and VMS email systems (e.g. Pine) don't parse the HTML. They display the code as text. Most unix terminals use monospace fonts. This includes ALL systems which are connected to in a Telnet-type environemnt.
- Many institutions (including colleges) take administrator privileges away from users, and do one of the following to emails containing HTML:
- Turn off HTML parsing (you see the HTML as text)
- Render the page as plain text by sstripping all tags out of the code. But you see the & codes instead of the characters they make.
- Throw emails containing HTML into spam boxes.
- Throw the HTML email away entirely, often without notifying the user that he didn't get it.
They do this to prevent malicious software from getting into their systems.
- Some system-wide firewalls strip HTML code out of the incoming email data stream, leaving plain text.
- Some legacy browsers (such as Lynx, used on DOS systems), and emailers render only a few tags. The other tags are just deleted from the text without formatting it. Fonts are meaningless on such browsers, since they use the CGA text screen.
Last edited by MidiMagic; Apr 24th, 2007 at 4:27 am.
Daylight-saving time uses more gasoline
•
•
•
•
Find out what email systems your clients have.
Send different emails to clients with different systems.
And about Outlook, there are options to choose whether or not to read HTML, and I'm pretty sure by default, Outlook is set to read emails as HTML, not plain text. I've just recently installed it on my pc, and didn't make any changes in the settings, and it is set to read HTML, and the HTML renders fine.
But apparently you all are very opposed to HTML email. I appreciate the opinions. I'm just wondering why then I get so many HTML emails every day from reputable organizations like Buy.com, TigerDirect, eBay, and DANIWEB. Surely their emails are being ready by MANY more recipients than mine, and are being farely successful, right?
That is my biggest question. Daniweb sends out HTML emails for all it's thread replies and all that. And I've looked at the source, it's just plane old HTML, no different from the one I'm sending.
How 'bout you Dani? I know you probably won't read this, but if you do, what experience/problems have you encountered sending out HTML email to all the daniweb members?
Last edited by nathanpacker; Apr 26th, 2007 at 4:15 am.
I guess with the pictures, you're right, I do have to add the sender to my safe list to see them, but the rest of the HTML seems to render fine. I don't know, I just wish it wasn't such a big deal. I was really proud of the little HTML email I created! Now I'm so sad I may have to trash my baby and go plain text!
![]() |
Other Threads in the HTML and CSS Forum
- Previous Thread: My website doesn't work on some computers.
- Next Thread: add a video slideshow
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






