How to center button text vertically


#1


Vertical-align doesn't center the button vertically.


div{
    height:50px;
    width:120px;
    border-color:#6495ed;
    baground-color:#bcd2ee;
    border-style:solid;
    border-width:2px;
    border-radius:5px;
    margin:auto;
    text-align:center;
    vertical-align:middle;
    background-color:#c4cde0;
}

a{
    text-decoration:none;
    color:white;  
}

span{
    color:#3b5998;
}


#2

please read this guide, it covers many ways to center elements/text (horizontal/vertical, uknown/known width)


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.