Flexbox neatly aligns all elements in the center of the screen
THIS IS A DIV
.caption
I'm aligned by my parent
.caption
.divcont
AND A SPAN
.another
.parent
.parent {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.divcont {
align-items: center;
justify-content: center;
display: flex;
flex-wrap: wrap;
flex-direction: column;
border: 1px solid;
width: 500px;
height: 300px;
}
.another {
margin-left: 10px;
}