1

Using bootstrap, I try to place a button in the center,
I achieve it by finely adjust the grid column by column

  <div class="form-group">
    <div class="col-sm-offset-3 col-sm-7">
      <button type="submit" class="btn btn-success">Sign in</button>
    </div>
  </div>

I tried text-center and block-center, they did not work properly.

How to get it done in a straight forward way?

AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
  • 1
    removing the `col` classes and adding `text-center` works on my end. – Douwe de Haan Jun 26 '18 at 11:38
  • 1
    I think @HerrSerker closes your question without give you a correct answer cause you want center your button with Bootstrap and not with CSS. Simply remove col classes like this
    – D. Schreier Jun 26 '18 at 11:39
  • Thank you, css is extremely hard, can only be mastered by massive utilization. I am shy prefer bootstrap as a shortcut. @D.Schreier – AbstProcDo Jun 26 '18 at 11:43
  • 1
    You shouldn't be ashame, bootstrap is a good way to save time and be quicker ;) Enjoy ! – D. Schreier Jun 26 '18 at 11:53

0 Answers0