[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 554
  • Last Modified:

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
0
-andreas-
Asked:
-andreas-
  • 7
  • 6
  • 3
2 Solutions
 
LZ1Commented:
What exactly is your question?
0
 
-andreas-Author Commented:
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;
0
 
LZ1Commented:
So this happens when you send the email from Outlook? Is there any other client you could use?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
-andreas-Author Commented:
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.
0
 
LZ1Commented:
I'm not sure there is a way to override the way Outlook sends emails. All the CSS your using is supported by Outlook 2003-2010.
http://www.campaignmonitor.com/css/

I don't think the !important override works, but you may wish to try it.
0
 
-andreas-Author Commented:
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.
0
 
RobOwner (Aidellio)Commented:
If you edit the signature outside of outlook you can make it look anyway you want and incorporate styles etc.  However LZ1 has made a good point with the campaignmonitor css reference as html/css is not standardised for use on email.  So how your signature may look when you're writing an email may not be how it appears to the other person receiving it.

Create a basic signautre in outlook and then go to

C:\Users\%username%\AppData\Roaming\Microsoft\Signatures

Edit the html file as you would a webpage
0
 
RobOwner (Aidellio)Commented:
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/
0
 
-andreas-Author Commented:
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.
0
 
-andreas-Author Commented:
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"
0
 
RobOwner (Aidellio)Commented:
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 }
0
 
RobOwner (Aidellio)Commented:
Did you try the CSS I posted in my last post
0
 
-andreas-Author Commented:
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!
0
 
RobOwner (Aidellio)Commented:
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

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

Please see here on giving grades

http://www.experts-exchange.com/help.jsp#hs=29&hi=403
0
 
-andreas-Author Commented:
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?
0
 
RobOwner (Aidellio)Commented:
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
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 7
  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now