It has several ways to center horizontally and vertically. You’re talking about "offset" to center horizontally using the grid system Bootstrap, so you better understand the concept because the numbers col-md-?
may vary:
Offset concept
Bootstrap GRID by default has 12 columns, see this image with lines 6 and 12 columns:
So if you want to center the column col-md-6
the offset must be from "3", so there are 3 columns for each side, totaling in 12 columns, easier to see the following image:
Vertical Alignment
There are several ways to do this, as you have not put any code, it is difficult to be specific, here are some solutions more professional than others:
Put a DIV of container of your form
with the following CSS:
height: 300px; /* obrigatório para centralizar verticalmente */
top:0px;
bottom:0px;
margin:auto;
position:absolute
Add margin-top:100px
to his container or form
, adjust the value according to your need, but remembering this is a false vertical center, when in fact you are pushing the object down, and if height varies the distance will always be the same.
There is also the vertical-align:middle
, but it works with tables
just, maybe there’s some mischief around here.
Intuitively, I believe it is
row-md-offset-?
forcol
= column androw
= line. But you should play an example working on your http://jsfiddle.net problem and post here.– Paulo Roberto Rosa