I am not satisfied with the current 'shape' of this circular span as the information it carries goes bigger. This element will only and always display a text number, I've seen a few topic about making responsive circles with CSS but I had no sucess while adapting to my code so far. I still think this can be simply solved with css, but any help is appreciated even with JavaScript. Code below and results in attached image.Thanks in advance !
.notification {
background-color: #db0100;
color: white;
text-decoration: none;
padding: 15px 26px;
position: relative;
display: inline-block;
border-radius: 2px;
border: 2px #db0100 solid;
text-decoration: none;
}
.notification+.notification {
margin-left: 20px
}
.notification:hover {
background-color: #fa5554;
color: #fff;
}
.notification .badge {
position: absolute;
top: -10px;
right: -10px;
padding: 8px;
border-radius: 50%;
background-color: yellow;
border: 2px #db0100 solid;
color: #db0100;
}
<a href="#" class="notification"><span>Random Text</span><span class="badge">1</span></a>
<a href="#" class="notification"><span>Random Text</span><span class="badge">10</span></a>
<a href="#" class="notification"><span>Random Text</span><span class="badge">100</span></a>
<a href="#" class="notification"><span>Random Text</span><span class="badge">1000</span></a>