Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding Css

Status
Not open for further replies.

hjohnston

Technical User
Mar 8, 2005
2
AU
HI

I am currently ceating a simple E-Newsletter using tables and text formatted using CSS. When I copy the code and email it to myself the CSS formatting is lost. Is there a way to include the CSS formatting. However when I dont use css all my formatting shows up.

Any help would be appreciated
 
How are you implementing the CSS at the moment?
Is it a linked or imported stylesheet?
Is it embedded in the head of the document between <style> tags?
Is it "inline" (i.e. applied to individual tags)?

Embedded in the head is the safest method with mail clients, but beware that not all client like CSS. You should keep your CSS fairly basic to be safe.

Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 

Some email clients only support a subset of HTML and CSS.

If this is for an intranet, and you know what your target mail client will always be, then you should experiment with what that mail client understands (and check out resources for it).

If this is for general internet use, your best bet would be to do as Foamcow mentions, and make sure all your styles are inline.

You should also try and make sure all your images are loaded from a webaserver, instead of trying to embed them (this would be most compatible will most mail packages, I'd say).

Those aside, these pointers might also help:

- Do not include JavaScript
- Do not include rollovers, CSS hover effects, etc
- Do not include Flash

Hope this helps,
Dan


The answers you get are only as good as the information you give!

 
I'll jump on the bandwagon for embedded stylesheets as well. The other thing I ran into when I did email newletters (which also were posted online) was to be certain to fully qualify all path names. (i.e. rather than /images/logo.gif)

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Thanks for all your help, I ended up not using the css at this stage but it will be handy to know. This is the first time I have made an e-newsletter. I sourced the images of a server to keep file size down.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top