View Full Version : when i email my css not function, how?

12-10-2002, 06:05 AM

sorry for my english problem actually i am too urgent to solve this and others problem, hope some SUPER GENIUS Know how to read, .. .sorry about that.....

when i sending out my email with CSS to users, the CSS are not workable, so what should i do?
my email will be a HTML file, and some picture files.
how to do send email with CSS & Picture files?? actually im using ASP to send email.
i want the mail can be read nice in Outlook and some others free email service like Yahoo!, Hotmail.


12-10-2002, 06:39 AM
You'll need to elaborate a lot more in order for us to be able to help you. With the thread above, it's very difficult to understand what the question is.

I understand English may or may not be your first language, but we can all try and be as descriptive as possible :)

Please edit the above thread if you can for grammer and additional info on your question.

12-10-2002, 10:22 AM
Getting html email to display is one of the hardest things anyone can do. Clients display differently than web-based email and we won't even mention the 30 million in AOL which can drive a man to drinking. :D

You must be more specific...Is this server side? What errors are you getting? Is the css in the head properly?

Post your code for more help. :p

12-10-2002, 01:49 PM
One quick questions:
Are you including your css as an external style-sheet (eg <link rel="stylesheet" type="text/css" href="style.css">); as a style within the document (eg <style> ... </style>); or as inline styles (eg <p style="...">)?

This may not help -- as zoobie mentioned, the way email programmes render html is pretty ugly, so you are not likely to be able to use css properly.

12-10-2002, 08:25 PM
Well, this is email and I really don't know if you can include a style sheet as an attachment then call on it like a website directory.

I know this way works:

<style type=text/css>
body {background-color:green;}
.this {font:bold italic 12 arial; color:red;}
.that {font:normal 12 tahoma;color:white;}

<span class=this>Hello!</span>

Sometimes, the quotes throw the whole thing off. Like was said...we need more info.

(Some posters just post once then leave and never come back.) :D

12-10-2002, 09:11 PM
i think that the way most people do it, is to upload their graphics and css to some server, and then link to that. i'm almost positive, that you can't include images and css in HTML email, any other way.

12-10-2002, 11:18 PM
You can. It took me 2 months but I figured it out using a serverside php language. Actually, just using a client like Outlook Express works, too. Files are actually included with the email be it inline or as attachments. Remember that the mail must include the header text/html so the client/web server knows what it is and displays it accordingly. Viewing html email is naturally done thru a browser...hence the css works normally. One problem is that users may have disabled their html settings and can only receive text email. In this case, it may be best to include 2 versions...text/html which then defaults to the text/plain. Next problem is AOL which handles text/html email differently because they want you to use their web-based account. Almost impossible...but I got it...hence the 2 months.

Where;s that darn thread-starter? :D

On a side note, I tried this guy's script listed at SourceForge where it was listed as 'stable', etc...and even being a newbie to php at the time, I could see where it wasn't going to work. I emailed him and received strange replies like "Really? I didn't know that." & "I just assumed it displayed properly." Next, I told him it didn't display in AOL either and he replied "Well, I don't have AOL." :rolleyes: I finally had to give up on that one (2 weeks wasted) and find another to start my quest. :D

All of the above is why people don't mess much with html email...unless they want splitting headaches. :cool: