Skip to main content
Hosun
Inspiring
June 8, 2019
Answered

hover

  • June 8, 2019
  • 2 replies
  • 346 views

Hi,

For hover, I wrote below.

i {
font-size: 15px;
margin-right: 3px;
color: dimgray;
}

i:hover {
color: white;
}

But the color of the icon doesn't change to white.

Is there any way to make it happen?

Hosuns Portfolio 3

Hosun Kang

This topic has been closed for replies.
Correct answer osgood_

You will need to get more 'specific'.

Instead of:

i:hover {

color: white;

}

Use:

ul li a:hover i {

color: white;

}

2 replies

osgood_Correct answer
Legend
June 9, 2019

You will need to get more 'specific'.

Instead of:

i:hover {

color: white;

}

Use:

ul li a:hover i {

color: white;

}

Nancy OShea
Community Expert
Community Expert
June 8, 2019

Is the element an active link?  You need to target the anchor.

CSS Pseudo-classes

Nancy O'Shea— Product User & Community Expert