+ 1

[SOLVED] Changing the color of link when hovering on it

When the user hovers on the link list item, I want to make it change to change the link text color also, but is is not working. I want it to change the link color when they hovers over the list item., not in the link text only. Code link: https://code.sololearn.com/WNB1p9jMhKpN/?ref=app

1st Nov 2020, 8:56 AM
Bibek Oli
Bibek Oli - avatar
1 ответ
+ 6
You should change color of the <a>, not of the <li>. ul li:hover, ul li:hover a{ color: white; background:green; }
1st Nov 2020, 9:00 AM
Artem 🇺🇦
Artem 🇺🇦 - avatar