Is it possible to make like on a ul li structure with flexbox? I tried making the squares width set on 25% and the 1st, 3rd or the 5th one to 50% width with a trick of clear:lefts and combination of float:left and rights. But somehow the last square tends to drop on a single row itself.
HTML:
<ul id="test">
<li class="item">
A
</li>
<li class="item">
B
</li>
<li class="item">
C
</li>
<li class="item">
D
</li>
<li class="item">
E
</li>
</ul>
CSS:
#test {
list-style:none;
width:100%;
}
.item {
width:33%;
float:left;
background-color: #444
}