Search code examples
csstextalignmentpadding

CSS: change vertical text position in HREF


How would you change the vertical positon of text of a HREF? I would like to move the text down by 1 pixel AND STILL preserve the padding. I'm at a loss.

If you take a look at the following fiddle, http://jsfiddle.net/2vjbz/, the numbers is what I'm referring too.


Solution

  • The easiest fix is to change the top padding to one pixel more, and the bottom padding to one pixel less.

    Alternatively if you don't want to change the padding for any specific reason, try setting the line-height to 2px higher.