<div class="vertical"> <div class="content"></div> <div class="content2"></div> </div>
.vertical { display: flex; flex-direction: row; width: 200px; height: 200px; border: 1px solid blue; justify-content: center; align-items: center; margin:0 auto; } .content { width: 50px; height: 50px; background-color: red; } .content2 { width: 50px; height: 80px; background-color: green; }