Isadora according to the Bootstrap Documentation the way to make the "inline" form is this https://getbootstrap.com/docs/3.3/css/#Forms-inline
Your code had some basic bugs like the tag <label>
without being closed and other html organization structure problems.
I made this template by mixing your code and the Bootstrap documentation, I think it can suit you the way you want it.
OBS: In the first example the * is within the same Col-
of <input>
in the second example the * is separated into a Col-
and the <input>
in another Col-
(but everything is like inline)
<link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<form class="form-inline">
<div class="form-group">
<div class="col-md-3 col-sm-3 col-xs-3">
<label for="" class="control-label">*</label>
<input type="number" id="" name="protocolos[]" class="form-control" style="width:65px;display:inline"/>
</div>
</div>
<div class="form-group">
<label for="" class="control-label col-md-1 col-sm-1 col-xs-1">*</label>
<div class="col-md-3 col-sm-3 col-xs-3">
<input type="text" id="" name="siglas[]" class="form-control" value="'.$sigla.'" style="width:65px;display:inline"/>
</div>
</div>
</form>
Any doubt is just talk
Can you explain the need a little better? I couldn’t understand...
– DiegoSantos
There is no point in transforming the element into inline and setar width, because width does not work on inline elements. Maybe what you want is inline-block.
– Sam
Isadora your problem is VERY likely with importing Bootstrap into the page! I tested here and got the * and the input on the same line without problems. If you want I put the answer with the code
– hugocsl
Hi guys! Thanks for the answers! @dvd I’m going to try inline-block. Width is just to decrease the field size.
– Isadora Almeida
@Diegosantos just want to put text type fields on the same line, I wanted to know if bootstrap has any special class p this.
– Isadora Almeida
@hugocsl if you don’t mind sharing, I’d be grateful.
– Isadora Almeida