CSS for a:hover in an e-mail

Googling around it appears that it is not possible to properly format a hyperlink in an e-mail. But that said from experience (eg MailChimp etc) it appears that there are services that get it right.

The question is how?

What do you mean by “properly format”?
I get emails with links in them all the time.

:hover just isn’t supported in a lot of email clients, and there’s not much you can do about that. You can find support details on this page: http://www.campaignmonitor.com/css/

As Ralph said a lot of email clients don’t support hover so there’s nothing you can do for them. The other issue is that many email clients strip the css from the page which is why we have to inline all the css in the html which means that hover styles can’t be used as there is no way to use hover inline.

The best you can do is leave some css in the head (or body) to allow those that do use hover and don’t strip the code to work but you will need to make the rules specific because its likely that the email client will have its own rules for a:hover in place.

When you construct your html email it may also help if you put spans around the content that are in links and style the span colour and hover states instead which will stop the email client from over-riding with their link styles.

The easiest way to code an email is to take a template and modify it to your needs or just study it.

Good Luck :slight_smile: