RESOLVED How to do a vertical align center on header links

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
Like the way they are on my site?

http://www.elementalcoffeeroasters.com/


By the way, Internet Explorer has pretty much the same features as Firebug. Just like firebug, hit F12 and the developer panel will come up which will allow you to inspect any element and see all the CSS applied to it.
14 лет назад
Maybe, I can't tell, if you look at http://www.bkindustries.net/puravida you can see that the text does not line up in the vertical center with the background image. Very annoying
14 лет назад
bkindustries wrote:
Maybe, I can't tell, if you look at http://www.bkindustries.net/puravida you can see that the text does not line up in the vertical center with the background image. Very annoying


To vertically center the text in the header links (register, log in, shopping cart, etc.), you can add a line-height for the text to the style:

.header-links a
{
  color: #000;
  height:24px;
  display: inline-block;
  text-decoration: none;
  line-height:24px;
}

.
14 лет назад
Your a genius MB, thank you very much, worked perfectly. I knew I couldn't do vertical-align because that will just align the entire element not the text, but I couldn't remember what code to use to make the text align, I knew text centered automatically but I wasn't sure what caused it to center in the element

Thank you very much.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.