How do I vertically centre the text within a navigation button? I’m currently using line-height which doesn’t work for longer text that spans two or more lines.
-
MODX Staff
- 12,272 Posts
Do you know the height of the containing box space, or is it arbitrary?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
The height is currently fixed at 35px
-
☆ A M B ☆
- 24,524 Posts
There are a few ways you can do this; I usually use line-height:35px in a case like this.
You might want to make the site validate first. Many of the errors are trivial but some could be related to your problem:
http://validator.w3.org/check?uri=http%3A%2F%2Fltcc.dotty.net.nz%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
Also, the top menu is wrong in IE7, the text for the menu items is pushed to the left side.
Quote from: kittie at May 22, 2009, 04:05 PM
Hi Sharkbait,
I’ve added the code and seen no difference. Website can be found here http://ltcc.dotty.net.nz.
Thanks
BTW, it looks like the critical .css section for the drop-down items is this one (line 74):
.menu li:hover ul li a:hover
I think that’s where you’ll want the code Sharkbait is suggesting.