0

I would like to avoid the color change in an html email template when a anchor is clicked.

In Outlook, a white anchor get purple after it's clicked.

The code:

<table style="background-color: #404040; width: 100%;">
<tbody>
    <tr>
        <td>
            <table cellpadding="3" cellspacing="0" border="0" style="width: 100%; margin-bottom: 2px">
                <tbody>
                    <tr>
                        <td width="10px"></td>
                        <td><a href="http://www.izigo.pt" target="_blank" style="font-family: verdana,geneva,sans-serif; color: #D3D3D3; font-size: 10px; text-decoration: none;">Oficinas</a></td>                         
                        <td width="12px"></td>
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
</tbody>
</table>
Patrick
  • 2,995
  • 14
  • 64
  • 125

2 Answers2

3

Add this to your HTML:

<style>
a:visited {
  color: #FFFFFF; /* Or whatever white you're using */
}
</style>

It's just injecting CSS into your page to handle the a tag once it's been visited.

Josh Burgess
  • 9,327
  • 33
  • 46
  • Hi, Thanks! It's working in Outlook fine! I thought it would be an issue because I tried to define styles like this and Outlook simply does not apply them. – Patrick Jan 15 '15 at 23:11
  • Most email clients severely limit what style can be applied in emails. There are many good resources out there to explain which style attributes are safe, but generally anchor tags are safe territory. – Josh Burgess Jan 15 '15 at 23:13
3

To whoever needs to read it in 2023 or later, try this:

<a href="#" style="color: #ffffff">
  <strong style="color: #ffffff, font-weight: normal;">
    Click Me
  </strong>
</a>

For some reason strong works.