I'm studying flexbox and decided to create a menu, everything works fine, but it's getting a space without me having it, so I know flex: 1 occupies all space, but that's not what's happening. >
Code:HTML
<ulclass="nav">
<li class="nav-item"><a href="#">Item 1</a></li>
<li class="nav-item"><a href="#">Item 2</a></li>
<li class="nav-item"><a href="#">Item 3</a></li>
<li class="nav-item"><a href="#">Item 4</a></li>
<li class="nav-item"><a href="#">Item 5</a></li>
</ul>
Code: CSS
.nav {
background: #ED4343;
display: flex;
flex-direction: row;
flex-wrap: wrap;
list-style: none;
}
.nav-item {
flex: 1;
list-style: none;
text-align: center;
}
a {
display: block;
padding: 20px;
border: 1px solid #FFFFFF;
color: #FFFFFF;
text-decoration: none
}