0
I tried to do a bootstrap alignment, so that I had the label and next to it the control. Well, thinking that way, I opted for the class .form-horizontal
. Well, when I rescan the site, the alignment is with the label on top and the control on the bottom. The code is not certain the result. I made numerous attempts and got nothing. I’m reading about bootstrap, but I still can’t get the expected result.
<div id="agendamento">
<form class="form-horizontal" role="form">
<div class="control-group">
<label for="txtCnpjOs" class="control-label">CNPJ:</label>
<div class="controls col-sm-03">
<input type="text" class="span2" id="txtCnpjOs" placeholder="Digite o Cnpj">
</div>
</div>
<div class="control-group">
<label for="txtOS" class="control-label">OS:</label>
<div class="controls">
<input type="text" class="input-small col-sm-03" id="txtOS" placeholder="Digite o numero da OS">
</div><br />
<input id="btnPesquisar" type="button" class="btn btn-success" value="Pesquisar" onclick=" return MontaAgendamento();" />
</div>
</form>
<br />
<div id="filtro">
<div id="FiltroPesquisa">
<form class="form-horizontal" role="form">
<div class="control-group">
<label for="txtAcao" id="lblProxAcao" class="control-label">Ação</label>
<div class="controls">
<input id="txtAcao" type="text" readonly="true" value="" />
<input id="txtProxAcao" type="text" readonly="true" value="" />
</div>
</div>
<div class="control-group">
<label for="txtDataCadastro" class="control-label">Data Cadastro</label>
<div class="controls">
<input id="txtDataCadastro" type="text" readonly="true" value="" />
</div>
<label for="txtIDV99" class="control-label">ID V99:</label>
<div class="controls">
<input id="txtIDV99" type="text" readonly="true" value=""/>
</div>
</div>
</form>
</div>
</div>
</div> @*Fecho a div agendamento*@
The class of CSS
.col-sm-*
applies to a resolution≥768px
until<992px
. It doesn’t solve anything on my screen that’s much bigger... Anyway, OP has the CSS classes with errors! Where it readscol-sm-03
should be readcol-sm-3
.– Zuul
@Zuul I have little knowledge with bootstrap, but I believe . col-- is more related to the minimum limit, so if you access on a larger screen, you will still see the normal site, what does not happen is if you access in a lower resolution than
sm
. In his code I had seen these errors, the ideal is to follow the official bootstrap and not mix the versions.– Paulo
I use version 3.2.0 of bootstrap. I do not understand why it does not work as I would like.
– pnet
I think I missed class .controls. I managed to make it work by changing the code cited.
– pnet