6 replies [Last post]
ncpilgrim
ncpilgrim's picture
Offline
newbie
Last seen: 13 years 12 weeks ago
Joined: 2007-08-05
Posts: 10
Points: 0

Hi all,

I am having a tough time vertically centering the text in the grey box. I am building a CSS menu, I have moved the vertical-align: center directive all over the place to no avail. Any help please? I have been at this for a while. Arrrgh!

#actionBar
{
float: left;
height: 22px;
margin-top: 10px;
margin-bottom: 10px;
width: 100%;
background-color: #CDC9B4;

}

ul.actionMenu
{
font-size: .75em;
margin-left: 0;
padding-left: 0;
}

ul.actionMenu li
{
float: left;
list-style-type: none;
display: inline;
top: 50%;
}

ul.actionMenu a
{
text-decoration: none;
color: #000000;
text-align: center;
width: 4em;
padding-right: 6px;
padding-left: 6px;
vertical-align: middle:
}

Triumph (not verified)
Anonymous's picture
Guru

I'm not seeing any vertical

I'm not seeing any vertical align in your CSS. :?

Besides that it is vertical-align: middle;

To get it to display in the vertical center you may have to add display:table; to #actionbar and display:table-cell; vertical-align:middle; to ul.actionmenu

ncpilgrim
ncpilgrim's picture
Offline
newbie
Last seen: 13 years 12 weeks ago
Joined: 2007-08-05
Posts: 10
Points: 0

Updated CSS with vertical-align: middle;

Any ideas?

Thanks!

Triumph (not verified)
Anonymous's picture
Guru

ncpilgrim wrote:Any

ncpilgrim wrote:
Any ideas?

Thanks!
Oh, how nice of you to wait less than an hour before reminding us that we need to help you. :mad:

Do you mind terribly looking up above? :rolleyes:

ncpilgrim
ncpilgrim's picture
Offline
newbie
Last seen: 13 years 12 weeks ago
Joined: 2007-08-05
Posts: 10
Points: 0

Easy does it

Easy big fella: if you look at the title of my post, I noted that I added the code that I forgot to post first time. I asked if "Any Ideas?" to be polite and to avoid simply throwing a post up without comment. I am happy with any help I get minutes from now or weeks from now. I thought moderators were paid to be patient;)

Triumph (not verified)
Anonymous's picture
Guru

ncpilgrim wrote:Easy big

ncpilgrim wrote:
Easy big fella: if you look at the title of my post, I noted that I added the code that I forgot to post first time. I asked if "Any Ideas?" to be polite and to avoid simply throwing a post up without comment. I am happy with any help I get minutes from now or weeks from now. I thought moderators were paid to be patient;)
Crud! They made me a moderator? What torturous fiends!

I think moderators are chosen because of their quick temper and zero sense of humor. Tongue We've got to keep this place clean you know. No riff-raff and such.

Did you check my edit? display:table on the container and display: table-cell on the item makes it work on this end but it wasn't tested in any strange browsers (like IE).

ncpilgrim
ncpilgrim's picture
Offline
newbie
Last seen: 13 years 12 weeks ago
Joined: 2007-08-05
Posts: 10
Points: 0

Worked on IE7

My thanks! And you gotta shake that moderator assignment. Thanks again. Onto my next challenge. :thumbsup: