0
At the moment it’s this way like the code below, but I wanted the inputs
related to fields Crachá, Pessoa, e Nome
were aligned within a <div class='col-lg-12'>
.
But when you put the button to open a modal next to the input Crachá
they are all misaligned and unformatted.
Follow a screen print when the code below runs:
index php.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- Início do sript JQuery JS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Fim do script JQuery JS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="row">
<div class="col-lg-12">
<!-- inicia row -->
<div class="row">
<div class="col-lg-3 input-group" style="padding-left:16px;"><!-- Inicio Input Crachá -->
<label for="ex1">Crachá: </label>
<input type="text" class="form-control idfunc" name='cracha' maxlength="5">
<span class="input-group-btn">
<button type="button" class="btn btn-secondary" style="margin-top:25px;" data-toggle="modal" data-target="#Modal_idfunc">...</button>
</span>
</div><!-- Fim Input Crachá -->
<!-- termina row -->
</div>
<!-- inicia row -->
<div class="row">
<div class="col-lg-12">
<div class="col-lg-3"><!-- Inicio Input Bairro -->
<label for="ex1">Pessoa: </label>
<input type="text" class="form-control" id="" name="id_pessoa" size="40"><br>
</div><!-- Fim Input Bairro -->
<div class="col-lg-6"><!-- Inicio Input Bairro -->
<label for="ex1">Nome </label>
<input type="text" class="form-control" id="" name="nome" size="40"><br>
</div>
<div class="checkbox col-lg-3" style="margin-top:30px;"><!-- Inicio checkbox Registro Inativo-->
<label>
<input type="checkbox" name="inativo" value="true" style="outline:none;">Funcionário Inativo
</label>
</div><!-- Fim checkbox Registro Inativo-->
</div>
<!-- termina row -->
</div>
</div>
</div>
This only happens after you put the button to open the modal?
– Sam
Before you put the button, it’s perfect?
– Sam
Yeah, I don’t know why that
– user92870
See if the answer below solves the problem. Or else it would be good to post in the question an image of "before" of "after".
– Sam
I’ll edit the code that William sent and show a screen print
– user92870
The button is pushing the field to the left.
– Sam
face don’t really know why this is happening, the fields don’t align and I’ve tried several ways
– user92870
I think that button should have
position: absolute
, getting over the input.– Sam
I don’t know if Bootstrap already does it natively, but try putting it in the button span:
style="position: absolute; top:0;right:0;"
– Sam
the button is fixed but did not solve for inputs to go up, but was already helpful
– user92870