PDA

View Full Version : Centering Objects Vertically




scem0
Apr 1, 2004, 12:01 AM
I know you can
center text horizontally
but is there a way to center text (or more specifically a table) vertically without using carriage returns?

Because people with larger monitors won't have the table centered on their monitors (only horizontally).

I want something to look like this:

+-----------------------------------------+
| /|\ |
| | |
| | |
| +------------+equal distance|
| | The | as left side|
|<----------->| table |<------------>|
| | | |
| +------------+ |
| | |
| | equal distance |
| \|/ as top |
|-----------------------------------------+


I hope that helps :cool: ;) :o.

scem0



lind0834
Apr 1, 2004, 12:18 AM
As long as you like Tables..

You can make one big table with one big cell that takes up the whole screen and set horizontal align and vertical align of that cell to center.. the only problem with that method is not all browsers like to make tables 100% high.

mnkeybsness
Apr 1, 2004, 12:27 AM
the vertical-align (http://www.w3schools.com/css/pr_pos_vertical-align.asp) property works well in CSS

scem0
Apr 3, 2004, 07:10 PM
The frame method works very well, thanks :).

You can play around with it at emo.20fr.com, which is where my site will be located.

scem0