I have three flex items in my flex box. I want the first two centered and the last one to align all the way to the right along the main axis.
really basic overview:
<div class="flex flex-center">
<div>flex item 1</div>
<div>flex item 2</div>
<div style="margin-left: auto;">flex item 3</div>
</div>
My CSS for the flex class is:
.flex {
display: flex;
&.flex-center {
align-items: center;
}
}
What happens when I use a margin-left: auto;
is it pushes the first two flex items to the flex start of the main axis. I want the first two flex items centered, and the third item to align all the way to the right (end) of the main axis.