One way to do what you want is by using the 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>
<script src="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>
NOTE: For each screen size (Xs,Sm,Md,lg), you will have to configure one way, so test all sizes.
Want to center the whole block of
form
or its contents(labels
,inputs
...)?– Igor Mello
the whole block
– Vynstus