Currently, I am working on creating a navigation bar using flexbox. Everything seems to be functioning correctly except for one issue: when I hover over the space between my logo and the navigation links, it changes the color of my logo to the hover state color. While this is the desired effect for the logo itself, I do not want the empty space between them to trigger this color change. This behavior is a result of applying flex grow to my logo in order to align the navigation links to the right. Is there a way to work around this? I am not familiar with alternative methods such as using floats or setting display to block. Any suggestions or solutions would be greatly appreciated.
/*NAVIGATION-TOP SECTION*/
#nav {
display: flex;
position: fixed;
opacity: .5;
z-index: 2;
background: lightgrey;
padding: 20px 0 20px 0;
align-items: baseline;
width: 100%;
transition: .3s;
}
#logo {
flex-grow: 1;
z-index: 2;
padding: 0 0 0 50px;
font-size: 30px;
}
#logo:hover {
color: #00b0ff
}
.nav-links {
display: flex;
float: right;
padding: 0 25px 0 0;
}
.nav-links>a {
text-decoration: none;
color: black;
}
.nav-links>a:hover {
color: #00b0ff;
}
.nav-links>a>li {
list-style: none;
padding: 0 15px 0 15px;
}
<header>
<div id="nav">
<div id="logo">TECHNOLOGY CENTRAL</div>
<div class="nav-links">
<a href="#">
<li>Home</li>
</a>
<a href="#">
<li>About</li>
</a>
<a href="#">
<li>Services</li>
</a>
<a href="#">
<li>Contact</li>
</a>
</div>
</div>
</header>