I'm using flexbox for a full width navigation and space-between to distribute the navigation items.
I need the nav hyperlinks to take up all the space between each nav item but when I set each LI to flex: 1 it breaks the space-between and the items are not distributed evenly anymore.
.site-header-nav {
display: flex;
justify-content: space-between;
list-style-type: none;
margin: 0 0 40px;
padding: 0;
}
.site-header-nav li {
flex-grow: 1;
}
.site-header-nav a {
background-color: yellow;
display: inline-block;
padding: 10px;
width: 100%;
}
<ul class="site-header-nav">
<li><a href="#">Design Services</a></li>
<li><a href="#">Marketing Services</a></li>
<li><a href="#">Hosting Services</a></li>
<li><a href="#">Search Marketing</a></li>
<li><a href="#">Portfolio</a></li>
<li><a href="#">Company</a></li>
<li><a href="#">Shop</a></li>
<li><a href="#">Contact Us</a></li>
</ul>