Reputation: 134
I want to change css property of a class on hover of another class in css
#_nav li {
display:inline;
text-decoration:none;
padding-top:5vh;
line-height:8vh;
margin-right:5vh;
cursor:pointer;
}
#_nav li:hover + #drop{
color:blue;
}
#drop{
color:red;
}
when i do hover on
_nav_li
i want color of #drop to get blue
Upvotes: 0
Views: 76
Reputation: 515
Remove +
before #drop
and
Try this
#_nav_li:hover #drop {
color: blue;
}
Upvotes: 1
Reputation: 1621
<script>
$( ".nav" ).hover(
function() {
$("#drop").css("color", "blue");
};
</script>
Upvotes: 0
Reputation: 156
You can try this to change color on hoover
._nav_li:hover #drop{
color:#DDD;
}
Upvotes: 0