|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a table not long enough to fill the page. I want the table to always be in the middle of the page at no matter what resolution. I know that for text I could just have <td valign="middle"> but how can I do the same but for a table using CSS? Is there a variable where I can check the size of the screen and align it that way?
Thanks |
|
#2
|
|||
|
|||
|
try either the position:relative or postion:absolute positioners.
__________________
Ryan Jones (RyanJ) |
|
#3
|
||||
|
||||
|
Look here for an example of centering a <div> horizontally and vertically in the window. Use the div as a container for your page. This little exercise is not pure CSS, it uses a single cell table as the outer container. I generally don't use tables for layout, but if you want vertical centering, this seems to be the only elegant hack.
cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. Ask a better question, get a better answer. |
|
#4
|
|||
|
|||
|
Thanks in a million! I surely appreciated you sharing your knowledge.
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Positioning with CSS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|