PDA

View Full Version : Can you align an entire table vertically


Echostorm
04-14-2005, 12:30 PM
Greetings all,

I am having a dilema. Without turning my page into disgusting percentage based frames I want to be able to center a table vertically. Is it possible?? I want my site to apply to all visitors both high and low res monitors. I am supporting 1280 x 1024 and 800 x 600 res. But to fit the 800x600 on the screen the 1280x1024 needs to be in the middle to make up for its mini-me size. I tried making a table at 100% and nesting my table inside however it still doent correct the problem. IDEAS?!?!

Cheers

Echostorm

evo
04-14-2005, 01:11 PM
If you are using tables you need to do the following.

In your CSS, add:

html, body { height: 100%; }

For your table, keep the height: 100% property there. In the cell inside, change or add the vertical-align property and set it to middle.

<!-- Addition

In the cell add your other table that you want to align to the middle of the page

//-->

As for you using tables, I'm not going to preach web standards.