0
Centering Text
how do you make a login frame and center text?
5 Answers
+ 3
You can do the following to align your form both vertically and horizontally to the center of the page.
<div style="width: 500px; margin: 200px auto 0 auto;text-align:center;">
<form method="post">
Username: <input type="text" id="user" /><br />
Password: <input type="text" id="pass" /><br />
<input type="submit" value="login" />
</form>
</div>
+ 1
It is recommended to use CSS for centering text in HTML 5, per W3C's norm. James provided a good example of using CSS divs.
As far as a log in page, you're getting a bit ahead yourself.
0
James Flanders
0
<center>
0
@ James: nice example...