Search box with button (Bootstrap 3)
<p>I want to create a search box with a button on it's side, like the this:</p>

<p><a href="https://i.stack.imgur.com/JYPs2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JYPs2.png" alt="enter image description here"></a></p>

<p>But just on the right side of the page. So I put <strong>pull-right</strong> and this is how my code like:</p>

<pre><code>&lt;form action="/hms/accommodations" method="GET"&gt;            
&lt;div class="input-group pull-right"&gt;
   &lt;input type="text" class="form-control" placeholder="Search" id="txtSearch"/&gt;
   &lt;div class="input-group-btn pull-right"&gt;
        &lt;button class="btn btn-primary" type="submit"&gt;
        &lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt;
        &lt;/button&gt;
   &lt;/div&gt;
   &lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>and when I tried to run it, this is how it looks like:</p>

<p><a href="https://i.stack.imgur.com/UFQ0A.png" rel="noreferrer"><img src="https://i.stack.imgur.com/UFQ0A.png" alt="enter image description here"></a></p>

<p>Why is does the alignment like that? I hope someone can help me. Thank you.</p>