arianhojat
12-01-2005, 04:07 PM
hello i have a div inside of a div that contains 2 input's. i would like to center them according to the height of the parent divs height. setting verticle-align: to middle doesnt work. closest thing i got working is setting margin-top to 50px.
___main_div____
| div1......|div2 |
| html list | [<] |
|.............| [>] |
|________|____|
_Aerospace_Eng_
12-01-2005, 08:13 PM
Post your code. That little image does nothing.
pramsey
12-01-2005, 11:29 PM
I don't believe that vertical-align or valign applies to div. Maybe you can use tables instead and use <td valign=center>.
mark87
12-01-2005, 11:49 PM
I don't believe that vertical-align or valign applies to div. Maybe you can use tables instead and use <td valign=center>.
Using a table would withdraw benefits of using CSS.
There's a search button on the forum, and the question about vertically aligning div's has been asked many times. ;)
Here's a quick link which should help you though -
http://www.student.oulu.fi/~laurirai/www/css/middle/
felgall
12-02-2005, 09:29 PM
I have a page on how to centre align vertically using CSS at http://www.felgall.com/cshow02.htm