<div class="container">
<div class="row">
<div class="span6 center">
<form>
<table>
<tbody>
<td>foo</td>
</tbody>
</table>
</form>
</div>
</div>
</div>
JSfiddle
Note: I am using an abstracted layer so am unable to change the class of <form>
.
How do I get the form centred using Twitter-Bootstrap?
FYI: I have also tried with pagination-centred
.
You can add text-align: center; in css . Ok,try . form-group{text-align:center; }Please close the question when you have the good answer.
The native way for positioning elements in Bootstrap is using offset
. I will assume that you are using a 12-column layout.
<div class="container">
<div class="row">
<div class="span6 offset3">
<form>
...
</form>
</div>
</div>
</div>
Further information in the documentation
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<form>
...
</form>
</div>
</div>
</div>
Further information in the documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With