How to stop a link that changes color on hover?

I have an email link on my page that turns blue when it freezes.

I can’t fix it, I don’t want it to change at all. In it, CSS I have this:

.emaillink2 { text-decoration: none; color: white;} a.hover:hover { text-decoration: none; color: white;} #headerinfo { float: right; font-size: 32px; color: white; z-index: 1; text-align: right; margin-top: 20px; text-decoration: none; } 

HTML div:

 <div id="headerinfo"> Telephone: 07777777777 <br/> Fax: 07777777777 <br/> Email: <a href="mailto: info@website.org " class="emaillink2"> Info@website.org </a> </div> 

However, it still changes color on hover.

+6
source share
2 answers

Change this code:

 .emaillink2 { text-decoration: none; color: white;} 

to this code:

 .emaillink2, .emaillink2:hover { text-decoration: none; color: white;} 
+6
source

Instead of this

 a.hover:hover { text-decoration: none; color: white; } 

Use this.

 a:hover { text-decoration: none; color: white; } 
+4
source

Source: https://habr.com/ru/post/969944/


All Articles