On a standard-sized screen, I have a blue circle/badge that appears when there are unread notifications. It looks perfect when the screen is fully maximized.
https://i.sstatic.net/iJBtu.png
This is the HTML code:
<li class="nav-item">
<a class="nav-link position-relative" href="#">
<i class="fas fa-bell notification"></i>
@if (loggedInUserHasUnreadNotifications())
<div class="unread-notifications-circle-nav"></div>
@endif
</a>
</li>
Here is the corresponding CSS:
.unread-notifications-circle-nav {
position: absolute;
top: 10px;
left: 16px;
width: 10px;
height: 10px;
background: #007bff;
border-radius: 50%;
}
Despite my efforts, the image loses its position when the screen size is reduced. I've tried everything I can think of to keep the circle in place, but nothing seems to work. How can I ensure that the blue circle always stays where it should be?