1

I need to align the button with the inputs fields.

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<form>
   <div class="form-group col-lg-6">
      <label for="email">Nome:</label>
      <input type="email" class="form-control" id="email">
   </div>
   <div class="form-group col-lg-6">
      <label for="pwd">CNPJ:</label>
      <input type="password" class="form-control" id="pwd">
   </div>
   <div class="input-group-btn">
      <button type="submit" class="btn btn-default">Submit</button>    
   </div>
</form>

Any idea? Thanks.

1 Answer 1

1

Just add the class col-lg-6 to button div:

<div class="input-group-btn col-lg-6">
    <button type="submit" class="btn btn-default">Submit</button>    
</div>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<form>
   <div class="form-group col-lg-6">
      <label for="email">Nome:</label>
      <input type="email" class="form-control" id="email">
   </div>
   <div class="form-group col-lg-6">
      <label for="pwd">CNPJ:</label>
      <input type="password" class="form-control" id="pwd">
   </div>
   <div class="input-group-btn col-lg-6">
      <button type="submit" class="btn btn-default">Submit</button>    
   </div>
</form>

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.