/    Sign up×
Community /Pin to ProfileBookmark

Vertical Align not working INSIDE a Table Cell

Hi,

I’d appreciate some insight with my following problem.

I am trying to vertically align an image (testing with a piece of text) at the following page:

[url]http://new.mammacare.com/dev3/products.php?p_id=7[/url]

The CSS file is located at:

[url]http://new.mammacare.com/dev3/base2.css[/url]

I know vertical-align only works with table cells. The test text is located within a table cell element. The CSS for the table is as follows:

#product_viewer td {
vertical-align: middle;
color: #0000FF;
}

The color is set properly, but the text is not being vertically aligned. Can anyone help me?

Thanks,
–G

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@NatdizzleOct 07.2008 — looks like you got it
Copy linkTweet thisAlerts:
@opifexOct 07.2008 — give the td a height value!

[CODE]#product_viewer td {
[COLOR="Magenta"]height: 220px;[/COLOR]
vertical-align: middle;
color: #0000FF;
}[/CODE]


...and it will align to the middle of the vertical space available.
Copy linkTweet thisAlerts:
@Gator_DeveloperauthorOct 10.2008 — No, it's not working. At least not on Safari or Firefox 3.x on Mac.

Any suggestions?
Copy linkTweet thisAlerts:
@Gator_DeveloperauthorOct 10.2008 — Thanks, Opiflex. The td height was it!
×

Success!

Help @Gator_Developer spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...