I want the blue tag to be right in the middle of the gray tag.
Using the position of this tag is not in the middle
.container {
width: 100vw;
height: 100vh;
}
.parent {
width: 200px;
height: 200px;
background-color: gray;
border-radius: 30px;
margin: 0 auto;
position: relative;
}
.child {
width: 20px;
height: 20px;
background-color: lightblue;
position: absolute;
top: 50%;
left: 50%;
}
<div class="container">
<div class="parent">
<div class="child"></div>
</div>
</div>