Reputation: 103
I want to create a hyperlink that doesn't change the text when I hover over it. I've created a special style for that type of link as follows:
a.blank:hover{
text-decoration:none;}
and the link itself:
<a class="blank" id="asdf">asdf</a>
I also have a general hyperlink style:
a:hover, a:active {
text-decoration: none;
color: #321dd3; }
I know I could get around it by defining the text colour as being the same, but is there an umbrella method to force the hyperlink not to change anything?
Upvotes: 0
Views: 1819
Reputation: 18891
There are libraries such as reset.css
(And more like it) that will remove these styles, but that may affect other parts of your page. It's best to use
a:hover, a:active {
text-decoration: none;
color: inherit;
}
You will also need to add a{text-decoration: none;}
and define the color
property (That's what's inherit
ed) for its parent element.
Fiddle: http://jsfiddle.net/VhCf8/
Upvotes: 7