Using flexbox, how can I move the .bottom
div to the bottom of the window? The flex-direction
of the .boxContainer
is column
so that everything can be moved vertically. I tried align-self: flex-end
and align-self: baseline
but both just pushed the box horizontally, not vertically. I hope someone could help me fix this.
.boxContainer {
width: 100vw;
height: 100vh;
background: peachpuff;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.center {
width: 300px;
height: 150px;
background: honeydew;
}
.bottom {
width: 300px;
height: 50px;
background: cyan;
align-self: flex-end;
}
<div class="boxContainer">
<div class="center"></div>
<div class="bottom"></div>
</div>