I have the following HTML to show notifications on a website. I want the number to be centered in the red circle. Also I want the whole div to be a href
I tried using the following CSS. Also please suggest how to approach such a problem. I'm completely new to frontend programming.
.txt {
position: absolute;
top: 4px;
left: 25px;
}
.btn-circle {
width: 30px;
height: 30px;
text-align: center;
background: red;
border-radius: 50%;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.css" rel="stylesheet" />
<div>
<i class="fa fa-inbox fa-2x"></i>
<a href="#" class="btn btn-circle txt">
<div class="count">10</div>
</a>
</div>