title: Adding button next to input, horizontal form style - Bootstrap
body: <p>I am trying to add a delete button next to an input.</p>
  
  <p>My current code:</p>
  
  <pre><code>&lt;form role="form" method="post" id="form"&gt;
  &lt;div class="form-group"&gt;
        &lt;div class="col-sm-9 "&gt;
         &lt;span&gt;Názov položky&lt;/span&gt;
         &lt;input type="text" class="form-control"&gt;
        &lt;/div&gt;
        &lt;div class="col-sm-3 "&gt;
          &lt;span&gt;Cena&lt;/span&gt;
          &lt;input type="text" class="form-control"&gt;
          &lt;button class="btn btn-danger btn-md"&gt;&lt;span class="glyphicon glyphicon-minus" aria-hidden="true"&gt;&lt;/span&gt;&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;button class="add_field_button btn btn-success btn-md"&gt;&lt;span class="glyphicon glyphicon-plus" aria-hidden="true"&gt;&lt;/span&gt;&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Generated output:</p>
  
  <p><a href="https://i.stack.imgur.com/RdQ8j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RdQ8j.png" alt="enter image description here"></a></p>
  
  <p>The red button isn't on the right side of the last input.</p>