I am curious about finding a way to maintain an even distribution of elements on each line, including the last one, using flex-wrap
or any other flexbox
technique.
For example, let's say I have a flexbox with 6 elements. When it wraps, I would like to have 3 elements on the first line and 3 on the second, or for both lines' total width to be approximately equal.
I don't want to resize the children or compromise the functionality of flexbox.
Currently, I am only able to achieve 5 elements on the first line and one on the last line.
ul {
display:flex;
justify-content:space-between;
flex-wrap:wrap;
}
You can view an example on jsfiddle here: https://jsfiddle.net/yfj2g7wx/
I believe that maintaining an even distribution across lines could enhance the visual appeal rather than wrapping elements individually.
Is there a solution to achieve this?