I’m getting some problems with vertical aligment.
I want to put my <span>›</span> element centralized in vertical.
http://jsfiddle.net/vpVEf/
Is there a way to centralize it automatically as the “li a” in this example? Note that the a element is centralized without using line-height.
http://jsfiddle.net/vpVEf/9/
The reason this is happening is because the
atag has a padding, pushing down everything in it by 12px.Remove the top/bottom padding and use
line-heightto make it68pxtall.It might not look like it, but this does fix the problem. Remove all formatting from the
spanto see! But now the issue is that the text isn’t aligned center within the span. You can useline-heighton thespanto adjust that as well.Seems to work well.
DEMO