How to center text inside anchor tag

css, html

Solution

Add

text-align: center;
line-height: 28px;

working demo: http://jsfiddle.net/3SE8L/2/

Problem

I want my anchor tag look like a button, and created this style JsFiddle ``` .details-button { background: linear-gradient(to bottom, #FFFFFF 0, #FAB149 2%, #F89406 100%) repeat scroll 0 0 transparent; border: 1px solid #FAB149; -ms-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: 0 1px 2px #999999; -ms-box-shadow: 0 1px 2px #999999; box-shadow: 0 1px 2px #999999; color: #FFFFFF; cursor: pointer; font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: bold; -ms-text-shadow: 0 -1px #099FDF; text-shadow: 0 -1px #099FDF; margin: 4px; height: 28px; width: 85px; vertical-align: central; align-items: center; text-decoration: none; font: menu; display: inline-block; /*padding: 6px 0 5px 18px;*/ } ``` It looks as I want, but how to center text horizontally and vertically inside anchor tag?

Original source