Place fields text inline bootstrap [closed]

1

<label class="control-label col-md-3 col-sm-3 col-xs-3" for="last-name">*</label>
  <div class="form-group">
    <div class="col-md-3 col-sm-3 col-xs-6">

    <label>
      <input type="number" id="" name="protocolos[]"  class="form-control col-md-3 col-xs-3" style="width:65px;display:inline"/>            </label>

    <label>
      <input type="hidden" id="" name="siglas[]" value="'.$sigla.'" style="width:65px;display:inline"/>
    <label>

  </div>
</div>
    
asked by anonymous 02.03.2018 / 20:39

1 answer

1

Isadora according to the Bootstrap Documentation the way to make the form "inline" is this link

Your code had a few basic questions like the <label> tag without being closed and other html organization structure issues.

I made this template by blending your code and the Bootstrap documentation, I think it can serve you the way you want it.

In the first example * is within the same Col- of <input> already in the second example * is separated in a Col- and <input> in another Col- (but everything is inline type)

<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 to speak

    
05.03.2018 / 13:18