Example:
<div class="container">
<div class="row">
<div class="col-md-12">
<!-- Centralizar este form -->
<form>
....
</form>
</div>
</div>
</div>
Example:
<div class="container">
<div class="row">
<div class="col-md-12">
<!-- Centralizar este form -->
<form>
....
</form>
</div>
</div>
</div>
One way to do whatever you want is to use Offsetting columns , so you can control the size of the fields and the margin to the left of the form, see the example below:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-xs-8 col-xs-offset-4">
<!-- Centralizar este form -->
<form>
<h1>FORM</h1>
<div class="row">
<div class="form-group col-xs-4">
<label>Nome</label>
<input type="text" class="form-control"/>
</div>
</div>
<div class="row">
<div class="form-group col-xs-2">
<label>Idade</label>
<input type="text" class="form-control"/>
</div>
</div>
</form>
</div>
</div>
</div>
/ p>
If you use an HTML version earlier than 5, you can use:
<center></center>
If you use HTML5, you must use CSS:
margin-left: auto;
margin-right: auto;