#header { .badge { position: relative; } .badge:after { content: attr(data-badge-number); position: absolute; top: 0px; right: 15px; display: inline-block; max-width: 30px; width: auto; overflow: hidden; margin: 0px; padding: 1px 5px; /* border: 2px solid white; */ background-color: #D60000; color: white; font-size: 10px; font-weight: bold; text-align: center; text-overflow: ellipsis; vertical-align: top; white-space: nowrap; text-shadow: rgba(0, 0, 0, 0.496094) 0px -1px 0px; .border-radius(9px); .box-shadow(black 0px 1px 3px); } }