I would like to have the flex children rendered inline-block
so that border-bottom
is under the li
's width instead of the container's width.
Apparently flex children can't be set as inline-block?
Is there a workaround to this problem?
.menu {
display: flex;
flex-flow: column;
list-style: none;
padding: 0;
}
.menu > li {
display: inline-block;
margin-bottom: 1rem;
border-bottom: 3px solid black;
}
<ul class="menu">
<li>Tab 1</li>
<li>Tab 2</li>
<li>Tab 3</li>
</ul>