3 replies [Last post]
gidmeister
gidmeister's picture
Offline
Regular
NY
Last seen: 7 years 47 weeks ago
NY
Timezone: GMT-4
Joined: 2011-03-01
Posts: 47
Points: 93

vI have a footer thats in a master page in my asp.net website.
I find that I cannot get the text ("Get Help") to be vertically in the middle. It comes right before an image ("questionmark.jpg"), and the image is higher than the text, and the text is at the baseline of the imagge. I'd like it vertically centered at the vertical midpoint of the image. "valign=middle" does not work.
Thanks.

CSS:
#footerx
{
position:absolute;
bottom:0;
width:100%;
height:80px;
}
HTML

 

Get help: get help

 

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 22 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Vertical alignment

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gidmeister
gidmeister's picture
Offline
Regular
NY
Last seen: 7 years 47 weeks ago
NY
Timezone: GMT-4
Joined: 2011-03-01
Posts: 47
Points: 93

Thanks!

Smile

gidmeister
gidmeister's picture
Offline
Regular
NY
Last seen: 7 years 47 weeks ago
NY
Timezone: GMT-4
Joined: 2011-03-01
Posts: 47
Points: 93

another way to center text vertically next to images

I had all my images and text in a TD that had a style with vertical centering. That did not work, but putting each text/image pair in a table within the TD, where the table elements were vertically centered, did work.
The outermost table had absolute positioning, but the inner tables did not.