I am trying to vertically center an anchor within a fieldset using CSS but it always appears to align to bottom. Is there any tricks to this?
A:
Have you tried specifying a line-height for the text? It should help to align in both Firefox and IE.
Manuel
2009-01-02 12:25:20
Yes, I have tried line-height.
Craig
2009-01-02 12:38:15
+1
A:
You are not giving too much detail here. Besides the line-height you might also want to tweak top and bottom padding. It all depends on how much stuff you have inside the fieldset.
allesklar
2009-01-02 14:30:39
A:
Try setting the style vertical-align:middle;
<a href="www.google.com" style="vertical-align:middle;">google</a>
If that doesn't work posting your HTML would be helpful
bochgoch
2009-01-02 15:20:01
This will only work on a table cell. Modern browsers will accept display: table-cell; which in conjunction with vert-align will work. Older browsers won't however.
Ross
2009-01-04 12:43:37