I have added a CSS status feature to show whether the user is online or not:
https://i.sstatic.net/dz30e.png
Here is the CSS code:
.status-circle-online {
width: 20px;
height: 20px;
border-radius: 50%;
background-color: rgb(255, 60, 0);
border: 2px solid white;
bottom: 10px;
right: 10px;
position: absolute;
}
And here is the corresponding HTML code:
<div>
<img
src={profileImageSrc}
className="rounded-circle ml-3"
/>
<div
className={`status-circle-${online_or_offline_signal} cursor-pointer`}
/>
</div>
The issue I'm facing is that when I resize the window, the status indicator does not stay in place as intended:
https://i.sstatic.net/xDOoy.png
https://i.sstatic.net/je4p7.png
Any suggestions on how to make it "stick" to the image?