#tooltip{
    text-align: center;
    color: #fff;
    background:black;
    position: absolute;
    z-index: 100;
    padding: 10px 15px 10px 15px;
    font-size:10px;
    border-radius: 5px;
    line-height:13px;
    font-size:15px;

}

/* triangle decoration */
#tooltip:after 
{
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid black;
    content: '';
    position: absolute;
    left: 50%;
    bottom: -7px;
    margin-left: -7px;
}

#tooltip.top:after
{
    border-top-color: transparent;
    border-bottom: 7px solid black;
    top: -20px;
    bottom: auto;
}

#tooltip.left:after
{
    left: 7px;
    margin: 0;
}

#tooltip.right:after
{
    right: 7px;
    left: auto;
    margin: 0;
}