Vertical center anchors the tag within the box

I'm trying to vertically center an anchor in a set of margins with CSS, but it always seems to be bottom-aligned. Are there any tricks?

+1


source to share


3 answers


You don't go into too much detail here. Besides the line height, you can also adjust the top and bottom padding. It all depends on how many things you have in the field kit.



+1


source


Have you tried specifying line-height for the text? This should help align in both Firefox and IE.



0


source


Try setting the style to vertically aligned: medium;

<a href="www.google.com" style="vertical-align:middle;">google</a>

      

If that doesn't help post your HTML, you might find it helpful

0


source







All Articles