enter image description here In the div class, I choose form-inline. Whatever the contents of the divs were in the line. In the end, everything flies away. It is necessary that the first name was unlikely.

<div class="modal-body"> <form class="form"> <div class="form-group"> <label class="col-form-label">Имя</label> <input type="text" class="form-control" id="firstName"> </div> <div class="form-group"> <label class="col-form-label">Ѐамилия</label> <input type="text" class="form-control" id="middleName"> </div> </div> 
  • one
    <form class = "form-inline"> <div class = "form-group mb-2"> - Bert
  • in what sense flies away? where flies? - Bert
  • tag form is not closed - soledar10
  • AAA my eyes! EMIL !!! EMIL !!!!! Unlock this for me ... - PECHAIR

3 answers 3

You need to combine the input into one <div class='form-group'> :

 <div class="modal-body"> <form class="form"> <div class="form-group"> <label class="col-form-label">Имя</label> <input type="text" class="form-control" id="firstName"> <label class="col-form-label">Ѐамилия</label> <input type="text" class="form-control" id="middleName"> </div> </form> </div> 

    As I understand it seems that you need so -

     [ссылка Π½Π° ΠΊΠΎΠ΄Π΅ΠΏΠ΅Π½] https://codepen.io/uyuri/pen/OwJNOd 

    The whole thing is in the bootstrap and your html is better to place the type on the codepoin so that it is visual. in bootstrap col- is the grid column. and for inline properties, you need a form-inline class. If you combine in one common div but the bootstrap col will still be split into two lines

    https://codepen.io/uyuri/pen/OwJNOd

    • @Anamnian your code works on this page, but in code-code it does not. breaks into 2 blocks - Yurij
      <div class="form-row"> <div class="form-group col-md-6"> <label for="inputEmail4">Имя</label> <input type="email" class="form-control" placeholder="Email"> </div> <div class="form-group col-md-6"> <label for="inputPassword4">Password</label> <input type="password" class="form-control"Ѐамилия"> </div>