.parent{
background:#fff;
height:40vh;
width:50vw;
border: 2px solid black;
margin:auto;
display: flex;
flex-direction: row;
justify-content: flex-end;
padding:10px;
}
.child1, .child2{
height:25vh;
width: 30px;
border: 2px solid red;
margin:5px;
}
<div class="parent">
<div class="child1">1</div>
<div class="child2">2</div>
</div>
Check whether it’s working for you. And the same I’ve written in codepen too. https://codepen.io/ak228212/pen/QWajNzj
2
solved Positioning two child div inside parent div [closed]