How Do You Vertically Center a Table on a Webpage?

C

ChChanges

Can somebody tell me how to center a table Vertically on a webpage?

CSS?

Thanks for any help you can provide

Johnny
 
N

Neal

Can somebody tell me how to center a table Vertically on a webpage?

CSS?

Thanks for any help you can provide

Johnny


Do you know the user's viewport height? Answer: No.

So, how do you know the table can in fact be centered?
 
M

Mitja

ChChanges said:
Can somebody tell me how to center a table Vertically on a webpage?
CSS?

Yup, though it's one of its weak spots.

One thing people around here don't like: misuse of tables solves the
problem, because only TDs can have their content centered vertically. (In
reality; theoretically, you can assign display:table to a div and use
vertical-align then, but it won't work in IE, so it isn't much help). If you
know the exact height of the table, it's somewhat easier.

Anyway, a LOT has already been written about this topic. Further info:
http://www.google.com/search?q=css+center+vertically&num=0
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top