Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to Centre This Input Box

I am making an app. And here I have an input box and a button. I want to center it. I tried using the center tag, it did not work. I tried using align-items:center still did not work. How to do this ??? Here is my program –



.form-inline {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}

.form-inline label {
  margin: 5px 10px 5px 0;
}

.form-inline input {
  vertical-align: middle;
  padding: 10px;
  background: transparent;
  border: 1px solid #ddd;
}

.form-inline button {
  padding: 10px 20px;
  background: transparent;
  border-right: 1px solid #ddd;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  color: white;
  cursor: pointer;
}


        <form class="form-inline" action="/">
          <input id="email" placeholder="Enter email" name="email" />

          <button type="submit">Submit</button>
        </form>

How to achieve this ??? Pls help

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

**justify-content: center;**

.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading