I want to make like this:
Here the circle is an image.
I tried this. But when I resize the window size the image circle gets shifted changes its postion. How can I fix that.
<div class="main">
<img src=''>
<div>Text Text Text</div>
</div>
.main {
background-color: #fbd449;
border-radius: 4.5px;
padding: 0.5rem 3rem;
position: relative;
margin-left: 9rem;
}
img {
position: absolute;
background-color: chocolate;
width: 9rem;
height: 9rem;
top: -12%;
border-radius: 50%;
left: -20%;
}
Also for smaller screen the div height increases but the image is of same height. If possible could you also help me in this problem too.