I'm trying to center a button with text using Cuffon for the font, but I can't get it to align vertically and horizontally. The text-align property is working fine, but vertical align isn't.
Here's the code for my div block:
btndownload
{
background-color: #512c1d;
background: url('../Images/Btn_Brwn.png');
background-size: 103px 32px;
color: #B6BD00;
width: 103px;
font-family: 'Century Gothic';
font-size: 13px;
font-weight: bolder;
border: 0 solid #512c1d;
margin-top: 6px;
height: 32px;
cursor: pointer;
text-align: center;
vertical-align: middle;
text-shadow: none;
padding-top:10px;
margin-right: -16px;
line-height:25px;
}
<div id="btnDownload" title="Download Image" class="btndownload">
<cufon class="cufon cufon-canvas" alt="DOWNLOAD" style="width: 72px; height: 13px;">
<canvas width="77" height="13" style="width: 77px; height: 13px; top: 1px; left: -1px;">
</canvas><cufontext>DOWNLOAD</cufontext></cufon>
The "Download" button text is vertically centered in Chrome, IE10 and above, and Firefox, but not in IE9.
Possible mistakes could be font-size :13 px
, conflicting with line-height:25px
. Also, there's padding-top:10px
, which should also contribute to the vertical alignment issue.