Is it feasible to have two elements on the same line when aligning a series of elements with flexbox?
Consider this scenario:
.outer {
display: flex;
flex-direction: column;
margin-left: auto;
margin-right: auto;
width: 50px;
}
.outer .inner {
width: 50px;
height: 50px;
background-color: blue;
margin-bottom: 20px;
font-size: 24px;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
<div class="outer">
<div class="inner">1</div>
<div class="inner">2</div>
<div class="inner">3</div>
<div class="inner">4</div>
<div class="inner">5</div>
<div class="inner">6</div>
<div class="inner">7</div>
</div>
The current layout shows the elements in a column. Can certain elements be grouped to share a row like shown in this image?