Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Shreyas Sreenivasa
7,804 Pointsa:hover is not working
Hey there! I'm building a website but for some reason my a:hover is not working.
Code which is not working:
.dropdown-content-1 a:hover, .dropdown-content-2 a:hover {
text-decoration: underline;
background-color: #008080;
color: #999;
}
My complete code on JSFiddle: https://jsfiddle.net/fgkn9abc/
Thank you in advance!
2 Answers

Billy Bellchambers
21,689 PointsI think your use of !important is what is causing the problems your stating as its overriding later css code for your anchor elements.
I think the problem is here
.dropdown-content a:hover {
color: #3d72a4 !important;
}
Hope this helps

Billy Bellchambers
21,689 Points
Shreyas Sreenivasa
7,804 PointsBilly Bellchambers it works but the color of the text doesn't change.