Link to home
Start Free TrialLog in
Avatar of -andreas-
-andreas-

asked on

Use stylesheet in Outlook 2007

I'm trying to use a stylesheet in the signature in Outlook 2007. The problem is that when I do, it seems to work, but when I look at the source, Outlook has changed the stylesheet to inline CSS.
I am editing my signature html file in:
C:\Documents and Settings\User\Application Data\Microsoft\Signatures
Avatar of LZ1
LZ1
Flag of United States of America image

What exactly is your question?
Avatar of -andreas-
-andreas-

ASKER

The problem is that I want to remove underlines from the links in my signature.
To get that to work, many of the email clients (Thunderbird, iOS mail, Mac email...) need a stylesheet in the header to understand this, while Outlook reformats everything  to inline CSS instead, which makes the other email clients show the blue lines.

This is what I include in the signature:
<style type="text/css">.
testing {  font-family: "Helvetica";  font-size: 14px;  line-height: 18px;  color: #FF00FF; }
 a.testing:link {  color:#FFFFFF;  text-decoration:none;}
 a.testing:hover {  color:#000000;  text-decoration:none;}
 a.testing:visited {  color:#000000;  text-decoration:none;}
</style>

<a href="http://www.test.com"  class="testing"> www.test.com </a><br>

This is what I actually get when sending emails:
<span style='color:black'><a href=" http://www.test.com "><span
style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:white;
text-decoration:none'>www.test.com</span></a><br>

The other clients actually get the white color of the link, but not the text-decoration:none;
So this happens when you send the email from Outlook? Is there any other client you could use?
No, this is for a customer that uses Outllook 2003, 2007 and 2010.
I have tried to use the same signature in Thunderbird and then it works on all the clients I have tested including when sending to Outlook.
SOLUTION
Avatar of LZ1
LZ1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have seen that page, and I believe that it is supported when recieving mail, not sending.
I have tried the !important override too, but it does not seem to work.
Outlook seems to have its own stylesheets. I should say though that I am not an expert on this. Just starting to learn a little about stylesheets this week.
This is an examlpe of Outlooks stylesheets(?):
<style>
<!--
 /* Font Definitions */
 @font-face
      {font-family:Calibri;
      panose-1:2 15 5 2 2 2 4 3 2 4;
      mso-font-charset:0;
      mso-generic-font-family:swiss;
      mso-font-pitch:variable;
      mso-font-signature:-1610611985 1073750139 0 0 159 0;}
further down:
a:link, span.MsoHyperlink
      {mso-style-noshow:yes;
      mso-style-priority:99;
      color:blue;
      text-decoration:underline;
      text-underline:single;}

It does not say <style type="text/css"> in the beginning though?

Anyway, this does not get converted to inline CSS, but all the efforts I have made so far is resulting in Outlook either not using my stylesheets at all or converting them.
I have tried to change the last text-decoration:underline  to none in the above Microsoft "Stylesheet" in the signature, but the email does not contain the changes I made, but the text above instead.
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In terms of inline css, a lot of email client software do not support/function as expected unless the css is inline.

I've also found this useful for creating html emails (or signatures) that are accepted by most clients

http://premailer.dialect.ca/
Editing the signature with another program is exactly what I do. The problem is that when Outlook take the edited signature and uses it in an email it reformats everything, and when looking at the html source of the mail that is actually sent, it does not contain the stylesheet anymore, but inline CSS instead.
I know that not all email clients accept a stylesheet in the header, but actually, when I use the same signature in Thunderbird, it does not reformat everything, and when I read the mail from Thunderbird in many of the most popular email clients it actually looks as I would like it to look. It even looks right in Outlook! Interestingly though, is that when I reply on the message in Outlook, it reformats everything and makes inline CSS instead.
Thanks for the link. It seems they do exactly the same thing, that Outlook does, with their script:
"•CSS styles are converted to inline style attributes"
What settings do you have under "Mail Format" in Tools->Options??

The reason the css is made inline is for compatibility with all other mail clients...  I know it's frustrating but as there is no "html standard" for email, they all do whatever they want.  As you can see from the campaignmonitor link the web based email clients have hardly any support for css at all.  

You also don't know how others have their email client configured eg they may convert html to plain text or rich text stuffing up your formatting.

To get around this, dirty but alas i haven't found another way, is to use images to get the effect you want...

Just looking at your css again, have you tried

a.testing { text-decoration:none }
Did you try the CSS I posted in my last post
Sorry, it seems that this is not possible to do this with signatures in Outlook. I have tried everything above and alot more, but nothing works. I give you both half of the points because you tried.
Thank you!
That is what I was trying to tell you above that there is no standard for HTML and CSS in ANY email client, including Outlook.  

see here for support what clients support:

http://www.campaignmonitor.com/css/

As for the C grade, I'm sure the others will agree that because it can't be done doesn't mean it's a wrong answer

https://www.experts-exchange.com/help.jsp#hs=29&hi=405

Please see here on giving grades

https://www.experts-exchange.com/help.jsp#hs=29&hi=403
Sorry, I have not had the time to look how to use the grade system. I did not think it mattered to the one who answers on the questions as long as they (you) get the points.
I thought that the grade only would show others if it is solved or not.
I don't know how to solve this now. Is it possible to change the Grade?
yes it's possible to change the grade.  Click the Request Attention link at the top and explain that you want to change the grade.  The grade shows how well the problem was solved and yes it does affect the total points given.  It is a multiplier on the points you assign to the question