There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
CSS inside email


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
cpscdave's Avatar
Senior Member with 279 posts.
 
Join Date: Feb 2004
Experience: Intermediate
15-Jul-2008, 06:42 PM #1
CSS inside email
Anyone have any experience with this?
I've tried leaving a css link tag but that didn't work in all the email clients we tried.
I also tried embeding the CSS in the <head> area but again no luck.

Any ideas? I dont really want to go back thru and hard code all the style into the body
__________________
Its not a bug.... Its a feature!

Programming today is a race between software engineers striving to build bigger and better idiot-proof
programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rick Cook

Spam a problem for you? http://spamooze.com
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,526 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
15-Jul-2008, 08:57 PM #2
Did the link refer to some website somewhere? If so, that will be problematic since some e-mail clients will block loading of content hosted on external servers. Spammers do that a LOT which is why e-mail clients block loading remote content. Malicious e-mail also uses this technique.

Embedding the CSS is your best bet.

Peace...
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,526 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
15-Jul-2008, 08:59 PM #3
Does the link refer to some website somewhere? If so, that will be problematic since some e-mail clients will block loading things from remote sites. Spam and malicious e-mail messages sometimes do this which is why remote site access is blocked.

Either embed the CSS or have the e-mail message contain a link to a web page where the browser can fully render the page.

Peace...
cpscdave's Avatar
Senior Member with 279 posts.
 
Join Date: Feb 2004
Experience: Intermediate
16-Jul-2008, 11:05 AM #4
I've tried both ways.
First had it referering to an external site (where the images are hosted) but that of course didnt work, So then tried replacing the link with the css inside of a
<style>
</style>
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,526 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
16-Jul-2008, 11:34 AM #5
When you send a message with the CSS embedded in the <head> section, have you looked at the source of the message as received by the e-mail client to see what happened to the HTML message you sent?

Peace...
cpscdave's Avatar
Senior Member with 279 posts.
 
Join Date: Feb 2004
Experience: Intermediate
16-Jul-2008, 11:51 AM #6
Odd it looks like the webmail is actually changing the source.
For example the template has:
Code:
<img src="http://spamooze.com/mailer_img/Newsletter_Header.jpg" alt="SpamOoze Newsletter" width="612" height="120" />
when you look at the source in Outlook you get the same.

When you look at the source in the webmail (zimbra) you get:

Code:
<img alt="SpamOoze Newsletter" width="612" height="120" dfsrc="http://spamooze.com/mailer_img/Newsletter_Header.jpg">
Which just doesn't work when I pop it back into dreamweaver...
Any idea's on how to tighten this up so that it works??
__________________
Its not a bug.... Its a feature!

Programming today is a race between software engineers striving to build bigger and better idiot-proof
programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rick Cook

Spam a problem for you? http://spamooze.com
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,526 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
16-Jul-2008, 11:56 AM #7
Looks like security against HTML email. The src tag was changed to "dfsrc", which is why the image won't load. What happens to the SAME message if you view it using Outlook Express or Mozilla Thunderbird?

Peace...
cpscdave's Avatar
Senior Member with 279 posts.
 
Join Date: Feb 2004
Experience: Intermediate
16-Jul-2008, 12:05 PM #8
Yeah it looks fine when I connect with Outlook to the webmail server...
Guess if its a security thing there really isn't anything we can do about it.

I was thinking there was a problem with how I had built the html (html isn't my forte)
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,526 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
16-Jul-2008, 12:14 PM #9
Wow, ok. If it works in Outlook and not in the webmail client, you can expect the same kind of "randomness" with others you send you mail to. Maybe you should restructure the format of your HTML mail so you won't need to use CSS styling.

I'm not really a HTML e-mail person so I'm not sure what the best course of action would be.

Peace...
sarahknz's Avatar
Junior Member with 28 posts.
 
Join Date: May 2003
Location: New Zealand
Experience: Intermediate
16-Jul-2008, 09:54 PM #10
I've got a fancy chart of which email clients let you use what markup.

Once you've waded through it you become resigned to using <font><em><strong> rather than tidy css.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,526 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
17-Jul-2008, 01:53 AM #11
Thanks for the info!

Peace...
Reply


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:07 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.