Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot set color for visited links in Email

Tags:

html

css

email

This is a simple question that I'm having lots of trouble finding the answer to. I'm setting the color of links like so:

<a style="color:#3067b3;text-decoration:none;" href="#">colored link</a>

But when I click the link it turns white for no reason, and I have not been able to change it back. Does anybody know why this is?

NOTE: I am designing an email that is meant to look correct across different email clients. Otherwise I would be specifying styles in a CSS file.

like image 441
bcloutier Avatar asked Apr 25 '12 22:04

bcloutier


People also ask

How do I change the color of links visited?

Firstly, if you want to change the color of the visited links, you do this from the Firefox options. Open the Firefox options, click the General tab and find the Language And Appearance section. Then click the Colors button in that section. This allows you to change the default visited link color.

How do I change the color of my email links?

Change the color of a link in the email editorHighlight the link, then click the text color icon in the rich text toolbar and select a color. To access more color options, click the Advanced tab and use the color picker.

How do I change the color of a link after clicking?

To change the color of hyperlink text, click Hyperlink, and then click More Colors. To change the color of the followed hyperlink text, click Followed Hyperlink, and then click More Colors.


2 Answers

Stephen's solution did work for me. I can't comment yet, so here's the necessary code Rajneesh asked for:

<a href="http://www.example.org" style="text-decoration: none; color: #EC7405;">
    <strong style="text-decoration: none; color: #EC7405;">Example Link</strong>
</a>

Make sure to use <strong>, I tried it with a <span> first, but that didn't work, it needed to be a <strong> tag for some reason. Also make sure to add at least the "text-decoration: none" style to the <a>, otherwise there might appear an underline after the link was clicked. I used the sure solution and added the full style to both the <a> and the <strong>, better safe than sorry ;)

like image 125
korguell Avatar answered Oct 27 '22 10:10

korguell


Most Email clients will completely ignore any CSS thats not inline, so external stylesheets are not the way to go

like image 29
Zack Avatar answered Oct 27 '22 10:10

Zack