Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

hover

Enthusiast ,
Jun 08, 2019 Jun 08, 2019

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

Q_Dw_24_hover.png

320
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 09, 2019 Jun 09, 2019

You will need to get more 'specific'.

Instead of:

i:hover {

color: white;

}

Use:

ul li a:hover i {

color: white;

}

Translate
Community Expert ,
Jun 08, 2019 Jun 08, 2019

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

CSS Pseudo-classes

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 09, 2019 Jun 09, 2019
LATEST

You will need to get more 'specific'.

Instead of:

i:hover {

color: white;

}

Use:

ul li a:hover i {

color: white;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines