Make sure to switch out your form container, .span9
, with .span12
to fully stretch the row across the screen. Then, define your login table as display: inline-block
and text-align:center
all the content within your form using these classes:
I personally created custom classes to avoid interfering with Bootstrap's default settings.
CSS
.login {
text-align: center;
}
.center {
*display: inline; /* for IE 7 */
display: inline-block;
text-align: left; /* resetting alignment to the left while keeping the container centered */
zoom: 1; /* fixes for IE 7 */
}
HTML
<div class="container">
<div class="row">
<div class="span12 login">
<form action="" enctype="multipart/form-data" method="post">
<table class="center">
<tr id="auth_user_email__row">
<td class="w2p_fl"><label for="auth_user_email" id="auth_user_email__label" style="display:none;">Email: </label></td><td class="w2p_fw">
<input class="string" id="auth_user_email" name="email" placeholder="email address" type="text" value="" />
</td><td class="w2p_fc"></td>
</tr>
<tr id="auth_user_password__row">
<td class="w2p_fl"><label for="auth_user_password" id="auth_user_password__label" style="display:none;">Password: </label></td><td class="w2p_fw">
<input class="password" id="auth_user_password" name="password" placeholder="password" type="password" value="" />
</td><td class="w2p_fc"></td>
</tr>
<tr id="submit_record__row">
<td class="w2p_fl"></td><td class="w2p_fw">
<input class="btn btn-large btn-primary" type="submit" value="Signup" />
</td><td class="w2p_fc"></td>
</tr>
</table>
</form>
</div>
</div>
<div class="pagination-centered">
By signing up, you are accepting our <a href="/legal/agreement/">terms & conditions</a>
</div>
</div>
Demo Link: http://jsfiddle.net/WgSgW/1/