I am trying to use <span>
to move some text in my navigator. My navigation bar is <ul>
, and all the <li>
elements, but the text is aligned at the top of the navigation bar, and I want it to be vertically centered. As you can see in JSFiddle, I use the a: hover property in CSS to change the background and color of the text when it hangs. When I apply span to text only, the entire hovering section also moves around. See if you can understand what I mean.
My JSFiddle here:
http://jsfiddle.net/G8CJ7/
Basically, I just want the text to be aligned vertically in a simple, concise way. I originally used tags '' and set margins for them, but I want to avoid using header tags for this purpose to improve SEO. Thanks.
source share