Problem with component width with form-inline bootstrap

0

I'm building a form and I'm having trouble organizing the form's components the way I would like it to be.

When I use the col-md class of the bootstrap the components are getting all unconfigured and when I size the fields by CSS, when responsiveness is used the components are all misaligned.

What is the best way to get around the component widths?

I would like to increase the size of DropDown and also Input Text, leaving all components on the same line responsively.

<!--MENU--><divclass="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <a href="/Pais/Index"> Pais </a>
            <i class="fa fa-circle"></i>
        </li>
    </ul>
</div>
<!-- MENU -->
</br>

<form class="form-inline" role="form">

    <!-- BOTAO NOVO -->
    <div class="form-group">
        <a href="javascript:;" class="btn red">
            Novo
            <i class="fa fa-user"></i>
        </a>
    </div>

    <!-- DROPDOWN CAMPOS PESQUISA -->
    <div class="form-group">
        <select class="form-control" id="dropdownColunasPesquisa">
            <option>Todos...</option>
            <option>Handle</option>
            <option>Descrição</option>
            <option>Sigla</option>
        </select>
    </div>

    <!-- TEXTBOX PESQUISA -->
    <div class="form-group">
        <input type="text" class="form-control" placeholder="Pesquisar">
    </div>

    <!-- BOTAO PESQUISAR -->
    <div class="form-group">
        <a href="javascript:;" class="btn red">
            Pesquisar
            <i class="fa fa-user"></i>
        </a>
    </div>

</form>
    
asked by anonymous 05.09.2017 / 15:39

1 answer

0

With form-inline you can use the size attribute to determine the width of your inputs, but the bootstrap repositions on screen due to responsiveness .

If you use form-horizontal , all fields will always be the same size.

One last tip for you to test, you can create a separate css style sheet and suppress the operation of some bootstrap properties using! important:

.classe-nova{ width: 'x pixels' !important; }

Then you put this class in the element you want to change and I recommend never changing bootstrap classes directly, after all what works on one page does not always look good on another. Thanks.

    
07.09.2017 / 19:39