I'm trying to create a nav bar for my site with vertically centered links. I cannot figure out how to make the links vertically centered within the nav bar. Margin and padding only move the entire nav bar around, and the vertical-align item does nothing. i suspect it's a problem with the structure of my tags. Here's the offending code:
No, line height won't help me. I'm trying to center the text within the nav bar area...
Yes it will. I use line height to vertically center text within nav bars (in fact this is the main method I use). You must set the height of the nav bar to be equal to the line-height of the text that must be aligned vertically. That is it! If you use proportional fonts (which I usually recommend), be sure to set both line-height and height in em, not px.
__________________
Join me on Please login or register to view this content. Registration is FREE
Last edited by wayfarer07; 04-01-2008 at 07:16 PM..
vertical-align properties are only applied to inline elements within the same container.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?