button data-count

applies a count to a button based on its data-count attribute

HTML

<button data-count="5">Notifications</button>

CSS

button {
    color: #333;
    padding: 4px 10px;
    border: 1px solid #aaa;
    outline: none;
    font-weight: bold;
    font-size: 12px;
    font-family: 'Corbin';
    background: #eee;
    border-radius: 3px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.5);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

button:after {
    content: attr(data-count);
    border-radius: 10px;
    display: inline-block;
    background: #777;
    padding: 2px 5px;
    width: 15px;
    margin: 0 0 0 8px;
    color: white;
    font-weight: normal;
    border: 1px solid #555;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.5),
        inset 0 -1px 2px rgba(0,0,0,0.5);
    text-shadow: 0 1px 0 rgba(0,0,0,0.6);
}