Reputation: 517
What's wrong with my :hover below? I dosen't seem to have effect. Tried overflow hidden but it doesn't appear any effect.
.tabs-nav li:hover {
}
demo https://jsfiddle.net/tpd83jxx/
Upvotes: 1
Views: 52
Reputation: 39
Below code works for me
.tabs-nav li :hover {
color: white;
background: red;
}
If I am not wrong Space is added to apply hover to the child of li. In this case for anchor tag
Upvotes: 0
Reputation: 2606
Nothing wrong with the css
,Here you applied background
for a
tag.
So change the hover to a
.tabs-nav li:hover a {
color: white;
background: red;
}
Upvotes: 1
Reputation: 2516
You have to apply the :hover effect in a:hover because you have already applied background-color to a element. Try and add this code.
.tabs-nav a:hover {
background-color: red;
}
Upvotes: 2