Is there a way to make the notification count in the notification tab only appear when there are new notifications, like shown in this picture? Please provide guidance on achieving this. If you are familiar with HTML and CSS code, I would appreciate your assistance. Thank you all and have a great day.
https://i.sstatic.net/kwqlr.png
Whenever I add the following code...
<span class="badge" style="background-color: #f0ad4e">1</span></a></li>
...after the navbar, it appears. However, it seems to display every time, regardless of new notifications. Is there a solution to this issue?
Here is the code snippet:
<li class="active" ><a href="/notification"> Notification <span class="badge" style="background-color: #f0ad4e">1</span></a></li>
CSS for the badge:
.nav-bottom .nav .dropdown li a .badge {
position: absolute;
right: 8px;
top: 13px;
padding: 3px 7px;
font-size: 10px;
}