title: Bootstrap button inside an input group appears detached from input
body: <h2>Problem description</h2>
  <p>I got a simple code where I want to display two buttons on the right of an input. But the button appears &quot;detached&quot; from the input. I don't want to play with negative margin.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /&gt;
  &lt;link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" /&gt;
  
  &lt;div class="col-md-4"&gt;
    &lt;div class="input-group"&gt;
      &lt;input type="text" class="form-control" /&gt;
      &lt;span class="input-group-btn"&gt;                                            
        &lt;button type="button" class="btn btn-default"&gt;&lt;i class="fa fa-calendar"&gt;&lt;/i&gt;&lt;/button&gt;
        &lt;button type="button" class="btn btn-default"&gt;&lt;i class="fa fa-history"&gt;&lt;/i&gt;&lt;/button&gt;
      &lt;/span&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <h2>Here is the result</h2>
  <p><a href="https://i.stack.imgur.com/5TMbG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5TMbG.png" alt="enter image description here" /></a></p>
  <h2>Attempted solution</h2>
  <p>I tried to put the input inside the <code>span.input-group-btn</code>. It then make the buttons stick to the input, but I loose the benefit of input auto sizing, and at mobile resolution, I get something like:</p>
  <p><a href="https://i.stack.imgur.com/D4l1G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D4l1G.png" alt="enter image description here" /></a></p>