|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
centering (horizontally and vertically)
is it possible to center something vertically inside a container without the use of tables?
I know you use text-align to center horizontally, but what is used for vertical alignment? vertical-align doesn't work. PHP Code:
thanks goran. |
|
#2
|
||||
|
||||
|
Short answer—no. A single celled table, using td's default valign="middle" is the only reasonably clean method.
Check out my vertical centering demo. 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. My html and css workshop, demos and tutorials. Ask a better question, get a better answer. |
|
#3
|
||||
|
||||
|
thanks, that's the method i normally use, i was just hoping there was a cleaner way.
goran. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > centering (horizontally and vertically) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|