Home > Net >  a:hoover color changes are not taking effect
a:hoover color changes are not taking effect

Time:10-05

I want to change the color of a tagged text when I hover over them.

The issue I am having is that my code isn't working as I expected it to and I can't tell why.

a {
  color: inherit;
  text-decoration: none;
}

a:hoover {
  color: #02a852;
}

The code for a works as expected, but I cannot say the same for a:hoover; it is supposed to turn a shade of green, but rather, it insists on turning the default blue a tags are set to.

Note: none of the a tags I am trying to target have any classes of IDs, in case this is relevant.

CodePudding user response:

You misspelled hover in your css, you instead have a:hoover, please see my answer for a corrected working example

a {
  color: inherit;
}

a:hover {
  color: #02a852;
}
<a href="www.google.com">Press Me</a>

CodePudding user response:

a {
  color: inherit;
  text-decoration: none;
  }

a:hover {
  color: #02a852;
 }
  • Related