I am having a hard time changing the color of NavLink inside the NavBar when it is inactive and when you hover over it.
<Navbar className="navbar-spacing justify-content-center" expand="lg">
<Navbar.Brand href="#home">
<img
src={logo}
width="270"
className="d-inline-block align-top"
alt="Overland NInja Logo"
/>
</Navbar.Brand>
<Navbar.Toggle aria-controls="on-nav" />
<Navbar.Collapse id="on-nav">
<Nav className="mr-auto" >
<Nav.Link className="inactive" href="#">Home</Nav.Link>
<Nav.Link className="inactive" href="#">Contributors</Nav.Link>
<Nav.Link className="inactive" href="#">Newsletter</Nav.Link>
<Nav.Link className="inactive" href="#">Contact Us</Nav.Link>
</Nav>
<Nav>
<Nav.Link className="inactive" href="#">Browse Overlanding Routes</Nav.Link>
</Nav>
</Navbar.Collapse>
</Navbar>
This is my CSS code:
.inactive {
color: #000;
}
.inactive:hover {
color: #1D8F32;
}
The style doesn't seem to be applied and the color is not changing at all (Even when it's active and inactive).