Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop a link changing color on hover?

Tags:

html

css

I have an email link on my page that goes blue when hovered over.

I can't seem to fix this, i don't want it to change at all. In it's CSS i have it as:

.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;
}

The div's HTML:

<div id="headerinfo">
Telephone: 07777777777
<br/>
Fax: 07777777777
<br/>
Email: <a href="mailto:[email protected]" class="emaillink2">[email protected]</a>
</div>

However it still changes color when hovered over.

like image 811
Joe Fenny Avatar asked May 28 '14 09:05

Joe Fenny


Video Answer


1 Answers

Change this code:

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

to this code:

.emaillink2, .emaillink2:hover
{   text-decoration: none;
color: white;}
like image 101
Janaka R Rajapaksha Avatar answered Oct 03 '22 09:10

Janaka R Rajapaksha