How can I center a single flex item in a container with justify-content: space-between in CSS?
#container {
display: flex;
justify-content: space-between;
}
<div id="container">
<div class='flex-item'></div>
...n flex-items...
</div>
I have a div set to display: flex with an unknown number of flex items. When using justify-content: space-between, the default behavior for a single flex item is left alignment when I want it centered. Is there a pure CSS solution to this issue?