I want to change the links color in the navbar when the mouse hovers at each one of them.
This is my 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 tried to change it with this code, but didn't work!
nav ul li:hover {
    color: red;
}
Any suggestions?
 
     
     
     
    