Vertically Aligning Divs
Posted
by Crays
on Stack Overflow
See other posts from Stack Overflow
or by Crays
Published on 2010-04-30T10:56:45Z
Indexed on
2010/04/30
11:17 UTC
Read the original article
Hit count: 278
css
Hi, i'm trying to make a small username and password input box. I would like to ask how do you vertically align a div?
What i have is a
<div id="Login" class="BlackStrip floatright">
<div id="Username" class="floatleft">Username<br>Password</div>
<div id="Form" class="floatleft">
<form action="" method="post">
<input type="text" border="0"><br>
<input type="password" border="0">
</form>
</div>
</div>
and how can i make the div with id Username and Form to vertically align itself to the center? I tried putting
vertical-align: middle;
in css for the div with id Login. But doesn't seem to work. Any help would be appreciated. Thanks.
© Stack Overflow or respective owner