0

How can I put in the center of the page these labels and inputs on the page that I am doing?

<form>
  <div class="row mb-3">
    <label for="inputEmail3" class="col-sm-2 col-form-label">Password</label>
    <div class="col-sm-3">
      <input type="password" class="form-control" id="inputEmail3">
    </div>
  </div>
  <div class="row mb-3">``
    <label for="inputPassword3" class="col-sm-2 col-form-label">Confirm Password</label>
    <div class="col-sm-3">
      <input type="password" class="form-control" id="inputPassword3">
    </div>
  </div>
Chris
  • 67
  • 2
  • 10
  • 1
    Does this answer your question? [How to align div in center of a page?](https://stackoverflow.com/questions/45204616/how-to-align-div-in-center-of-a-page) – Jelle Mar 16 '22 at 08:44
  • Yes! But how can I do it responsive? because when I do half screen of the page the placeholder got smaller – Chris Mar 16 '22 at 09:19
  • That might be because you have `col` attributes inside a `label`, remove the `col-sm-2` from the label and put the entire label inside your `col-sm-3` above the `input` – Cutey from Cute Code Mar 16 '22 at 09:32
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 16 '22 at 15:39

1 Answers1

0

Do this:

body {
    text-align: center;
}
form {
    display: inline-block;
}

This code takes your form to center. Hope this may be help you.

Manoj Tolagekar
  • 1,816
  • 2
  • 5
  • 22