Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable the bootstrap hover color for links?

I am using Bootstrap.

Bootstrap defines

a:hover, a:focus {     color: #005580;     text-decoration: underline; } 

I have this links / CSS-classes

<a class="green" href="#">green text</a> <a class="yellow" href="#">yellow text</a> 

How can I disable the hoover color?

I want the green links to stay green and the yellow ones yellow, without overriding :hover for every single class? (this question is not mandatory dependent to bootstrap).

I need something like

a:hover, a:focus {     color: @nonhoovercolor; } 

and I think

.yellow {     color: yellow !important; } 

is not a good practice.

like image 443
wutzebaer Avatar asked Apr 18 '13 13:04

wutzebaer


People also ask

How do I change the color of a link hovering?

To change the color of your link on hover, use the :hover pseudo property on the link's class and give it a different color.

How do I turn off hover style?

To remove the CSS hover effect from a specific element, you can set the pointer-events property of the element (the hover behavior of which you want to disable) to “none”.

How can I change bootstrap active link color?

There are two ways that you can change the font color of the active nav-item. The default font-color is white of the active nav-link in the case of Bootstrap nav-active item. The first-way approach is to use a CSS styling file and changing the nav-item class when clicked.


1 Answers

if anyone cares i ended up with:

a {     color: inherit; } 
like image 191
wutzebaer Avatar answered Oct 13 '22 22:10

wutzebaer