JSFiddle - React, Tailwind, and code Playground

HTML

<a id="myIcon" href="#" title="" class="icon" >
    <span id="iconOverlay" class="jewel">2</span>
</a>

CSS

.icon {
    position: relative;
    display: inline-block;
    height: 24px;
    line-height: 22px;
    text-decoration: none;
    border: solid 1px gray;
    padding: 0px 4px 0px 20px;
    background: silver url(http://lorempixel.com/24/24) no-repeat center center;
}
.jewel {
    position: absolute; 
    display: block; 
    top: -8px; 
    right: -8px; 
    height: 16px; 
    width: 16px; 
    font-family: Tahoma, Verdana; 
    font-size:11px; 
    font-weight:bold; 
    text-align: center; 
    line-height: 150% !important; 
    color: White; 
    background-color: Red; 
    -webkit-border-radius: 16px;
    -moz-border-radius: 16px;   
    border-radius: 16px;
    overflow: hidden; 
}