How center input in form in bootstrap?

Viewed 24803

I want to have two inputs ( login and password ). One under one, each about col-sm-6. I can't center this inputs without col-sm-offset-3. With offset It really works, but I want to center this inputs on every screens. Maybe I shoul add somewhere .center > Or margin auto? But where...

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<div class="container">

  <div class="row">
    <div class="box">
      <div class="col-lg-12">
        <hr>
        <h4 class="text-center">Logowanie</h4>
        <hr>
        <form method="post" role="form" class="form-horizontal">
          {{ csrf_field() }}
          <div class="row">
            <div class="form-group">
              <div class="col-sm-6">
                <input type="email" class="form-control" name="email" placeholder="email">
              </div>
            </div>
            <div class="form-group">
              <div class="col-sm-6">
                <input type="email" class="form-control" name="email" placeholder="email">
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>

4 Answers
Related