i'm trying to create a navigation bar, but one of the items contains a long text which wraps and doesn't look centered anymore, i tried text-align property but it looses the vertical alignement on the other items, here's my code (open in full page):
nav {
display: flex;
}
div {
flex: 1;
}
ul {
flex: 1;
display: flex;
list-style: none;
}
li {
flex: 1;
font-size: 24px;
border: 1px solid black;
display: flex;
align-items: center;
justify-content: center;
}
<nav>
<div></div>
<ul>
<li>text</li>
<li>text</li>
<li>text</li>
<li>Looonger teeeeext
</li>
<li>text</li>
</ul>
</nav>