Text input at the Bootstrap navbar
<p>I'm using Bootstrap to make a navigation bar and when I try to add a search bar it goes below the other elements instead of beside them. </p>

<p>I have jQuery and the Bootstrap JavaScript imported after everything, along with the Bootstrap CSS imported in the head tag.</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 rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt;

&lt;div class="navbar navbar-default navbar-fixed-top"&gt;
  &lt;div class="container"&gt;
    &lt;a class="navbar-brand" href="#"&gt;&lt;img src="logo.png"&gt;&lt;/a&gt;
      &lt;div class="collapse navbar-collapse"&gt;
        &lt;ul class="nav navbar-nav"&gt;
          &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;

          &lt;form class="navbar-form"&gt;
            &lt;input type="text" class="form-control" placeholder="Search"&gt;
            &lt;button type="submit" class="btn btn-default"&gt;&lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt;&lt;/button&gt;
         &lt;/form&gt;
       &lt;/ul&gt;
     &lt;/div&gt;
   &lt;/div&gt;
 &lt;/div&gt;

&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;</code></pre>
</div>
</div>
</p>