In the following code, if I comment out the align-items
line in flex-column, the background is gray and space exists between the icons. If I uncomment the align-items
, the background is blue and the icons are centered together.
I've thought of align-items
and justify-content
as orthogonal to each other - why is align-items
affecting a flexbox spacing issue in a child flexbox container? Doesn't the width start at 100%?
I would assume it would only manage its direct children. Further, the entire area is blue when align-items
is active, shouldn't I at least see the background of the icons as gray?
.flex-column {
display: flex;
flex-direction: column;
align-items: center;
background-color: blue;
}
.flex-row {
display: inline-flex;
flex-direction: row;
justify-content: space-between;
background-color: gray;
}
<div class="flex-column">
<div>Some Content0</div>
<div>Some Content1</div>
<div class="flex-row" style='border: solid;'>
<img src="update.svg" style="max-width: 20px;">
<img src="update.svg" style="max-width: 20px;">
</div>
<div>Some Content2</div>
<div>Some Content3</div>
</div>