I need help changing the color of the links in the navbar when they are hovered over with the mouse.
Here is my current code :
<header>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="index.html"></a>
</div>
<ul class="nav navbar-nav">
<li><a href="index.html">Home</a></li>
<li><a href="#">Product</a></li>
<li><a href="#">About us</a></li>
<li><a href="#">Contact us</a></li>
<li class="your_account"><a href="#">Your Account</a></li>
</ul>
<!-- Search form -->
<form class="form-inline d-flex justify-content-center md-form form-sm">
<input class="form-control form-control-sm mr-3 w-75" type="text" placeholder="Inspire yourself" aria-label="Search">
<i class="fas fa-search"></i>
</form>
</div>
</nav>
</header>
I attempted to make changes using this code, but it didn't work as expected!
nav ul li:hover {
color: red;
}
Do you have any suggestions for me?