I have two div tags in a container. I want to use flex box and align the first div tag to the top and the other be centered relative to the container. How can I do this?
Using align-items: flex-start
only moves it to the left when flex-direction is column. What is the equivalent css to move it to the top?
codepen: https://codepen.io/GMSg68/pen/aGpOpG
.box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 500px;
border: 1px solid blue;
}
.box div {
width: 100px;
height: 100px;
border: 1px solid darkgray;
}
.box div:nth-child(1) {
/* How do I push the first div tag to the top? */
background-color: lightgray;
}
.box div:nth-child(2) {
background-color: lightblue;
}
<div class="box">
<div>One</div>
<div>Two</div>
</div>