I tried to center a Bootstrap form, actually having .form-inline
. I wanted to center it and use Bootstrap classes, offset
ones in this case.
I created a div
which got .container
as class, so within I marked down the proper <div class="row">
and then(this is when it comes to ask):
<div class="col-xs-10 col-xs-offset-1">
or
<div class="col-xs-8 col-xs-offset-2">
or
<div class="col-xs-6 col-xs-offset-3">
or
<div class="col-xs-4 col-xs-offset-4">
finally
<div class="col-xs-2 col-xs-offset-5">
I tried with all these and the one I wrote bold is which worked better, my question is, is my aproach ok? Is there any other class which states put this centered?
This is my whole markdown:
<div class="container">
<h1>Solución de ecuaciones lineales.</h1>
<h3>Elige un método y el número <i>n</i> de ecuaciones e incógnitas</h3>
<div class="row">
<div class="col-xs-4 col-xs-offset-4">
<form class="form-inline" role="form" id="argumentos">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default">
<input type="radio" name="options" id="btnGauss"> Gauss
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="btnGaussJordan"> Gauss Jordan
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="btnMatrizInversa"> Matriz Inversa
</label>
</div>
<input type="text" class="form-control input-mini" placeholder="n" id="input-n">
</form>
</div>
</div>
</div>