Richten Sie die form in die Mitte, Bootstrap 4

Ich versuche, richten Sie die form in die Mitte und halten es entgegenkommend. Ich habe versucht, mehrere Möglichkeiten, aber kein Erfolg. Ich versuche, mich zu zentrieren, den gesamten text und form. Ich bin mit Bootstrap v4. Ich bin nicht sicher, ob das hilft.

Richten Sie die form in die Mitte, Bootstrap 4

HTML:

<section id="cover">
     <div id="cover-caption">
         <div id="container">
             <div class="col-sm-10 col-sm offset-1">
                 <h1 class="display-3">Welcome to Bootstrap 4</h1>
                 <div class="info-form">
                 <form action="" class="form-inline">
                    <div class="form-group">
                        <label class="sr-only">Name</label>
                        <input type="text" class="form-control" placeholder="Jane Doe">
                    </div>
                    <div class="form-group">
                        <label class="sr-only">Email</label>
                        <input type="text" class="form-control" placeholder="[email protected]">
                    </div>
                    <button type="submit" class="btn btn-success ">okay, go!</button>
                </form>
                </div>
                <br>

                <a href="#nav-main" class="btn btn-secondary-outline btn-sm" role="button">&darr;</a>
             </div>
         </div>
     </div>
 </section>

CSS:

html,
body{
 height: 100%;
}

#cover {
  background: #222 url('../img/stars.jpg') center center no-repeat;
  background-size: cover;
  color: white;
  height: 100%;
  text-align: center;
  display: flex;
  align-items: center;

}

#cover-caption {
  width: 100%;

}

Mögliche Duplikate von Wie center ein Formular mit Bootstrap?
Das ist nicht doppelt, da es nur relevant, um Bootstrap 3.

InformationsquelleAutor EyedFox1 | 2017-06-06

Schreibe einen Kommentar