Select2 with incorrect styling

Asked

Viewed 231 times

0

I’m using a Lect2, but its style is coming in a way that wasn’t expected. That way:

inserir a descrição da imagem aqui

  • How I make it fit and align with the input-group?

HTML code:

<div class="form-row">
    <label for="cidade">Cidade</label>
    <div class="input-group">
         <select id="cidade" name="cidade" class="form-control input-bairro"></select>
         <span class="input-group-addon" id="basic-addon3"><i class="icofont icofont-plus"></i></span>
   </div>
    <script type="text/javascript">
      $('#cidade').select2({
          dropdownParent: $('#mdCreateBairros'),
      });
    </script>
</div>

Javascript that starts Select2:

$('#cidade').select2({
    dropdownParent: $('#mdCreateRegioes'),
});
  • which version of bootstrap?

  • Bootstrap v4.0.0-beta

  • I am building a Jsfiddle with your code. Where the label "City"?

  • I added a few more things from @nbkhope

  • Have you tried using classes to set the size of columns? https://jsfiddle.net/229pgz9c/8/ (Reference: https://getbootstrap.com/docs/4.0/components/forms/#form-grid)

  • Also try inline-form: https://getbootstrap.com/docs/4.0/components/forms/#inline-Forms

  • The problem is that even without input-group, Lect2 is that inadequate

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.