Customizing link in an html email

Asked

Viewed 40 times

1

I am preparing an html and I want to customize the link with the event Hover, but I did not succeed.

<a href="http://www.teste.com/" target="_blank" style="color:#929292; text-decoration: none; display: block;">Acessar</a>
  • If it is for an email, it seems that right now it has no solution anyway. See this related question on Soen

  • Most email clients don’t recognize the tag <style> already the :hover vc is not possible to do direct inline in tag

1 answer

0

Just add the following rule to your html’s css:

a:hover {
    // aqui vai a customização desejada
}

Editing: There is no way to apply this inline rule, but for email html cases that all need to be in the same file you can put css inside the tags <style> within your <body>

  • Humberto, css is inline, because it’s an html email. I tried to insert the css the same way using:Hover and it didn’t work.

  • I edited the reply to cover your email case

  • Did not cover friend, no email client recognizes the tag body, and one or the other accepts Tad style, Outlook and even Gmail do not accept

  • It has some good years that I use the email template in this way and never had problems of not being recognized even in outlook. What can happen is that your email reader’s own style is overwriting the style you wrote, in which case you can use the attribute !important to force this style, although I do not recommend force the style. Why if someone is using a custom style has some reason, sometimes for accessibility reasons...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.