title: Rails, Bootstrap and Devise Navbar Login: How to get login details on same line?
body: <p>I have a situation where I know how to put all the details on the same line via css, but the css placement seems to break my code. </p>
  
  <p>Specifically, I am not sure where to put this line of code:<br/> 
  <code>&lt;form class="navbar-form navbar-right" role="form"&gt;</code></p>
  
  <p>Here is the <strong>code that works</strong> and lets me sign in correctly, but the css is not as I like (it looks odd because it is missing the css line I mentioned earlier): </p>
  
  <pre><code>&lt;% else %&gt;                
                  &lt;%= form_for(resource, :as =&gt; resource_name, :url =&gt; session_path(resource_name)) do |f| %&gt;
  
                    &lt;%= f.text_field :email, :placeholder =&gt; 'Email address', :class =&gt; "form-control" %&gt;             
  
                    &lt;%= f.password_field :password, :placeholder =&gt; 'Password', :class =&gt; "form-control" %&gt;
  
                    &lt;%=f.submit 'Sign In', :class =&gt; 'btn btn-default'%&gt;
  
                    &lt;div class="txt-right"&gt;
                       &lt;input type="checkbox"&gt; Remember me
  
    &lt;a href="#" class="forgot"&gt;&lt;i&gt;Forgot your password?&lt;/i&gt;&lt;/a&gt;
                      &lt;a href="#" class="forgot"&gt;&lt;i&gt;Sign Up&lt;/i&gt;&lt;/a&gt;
                    &lt;/div&gt;   
                  &lt;% end %&gt;
  
            &lt;% end %&gt;
          &lt;/ul&gt;
        &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>The above CSS looks like this. 
  <img src="https://i.stack.imgur.com/CUlBh.png" alt="enter image description here"></p>
  
  <p>Here is code that <strong>does not work</strong>, but looks better CSS-wise - </p>
  
  <pre><code>&lt;% else %&gt;
  
  
                  &lt;%= form_for(resource, :as =&gt; resource_name, :url =&gt; session_path(resource_name)) do |f| %&gt;
  
                    &lt;%= f.text_field :email, :placeholder =&gt; 'Email address', :class =&gt; "form-control" %&gt;             
  
                    &lt;%= f.password_field :password, :placeholder =&gt; 'Password', :class =&gt; "form-control" %&gt;
  
                    &lt;%=f.submit 'Sign In', :class =&gt; 'btn btn-default'%&gt;
  
                    &lt;div class="txt-right"&gt;
                       &lt;input type="checkbox"&gt; Remember me
  
    &lt;a href="#" class="forgot"&gt;&lt;i&gt;Forgot your password?&lt;/i&gt;&lt;/a&gt;
                      &lt;a href="#" class="forgot"&gt;&lt;i&gt;Sign Up&lt;/i&gt;&lt;/a&gt;
                    &lt;/div&gt;               
                  &lt;% end %&gt;            
            &lt;% end %&gt;
          &lt;/ul&gt;
        &lt;/div&gt;&lt;!--/.nav-collapse --&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>The above CSS looks like so <em>(I'll fix the "forgot pass?" text later, not sure how to do right now)</em></p>
  
  <ul>
  <li><img src="https://i.stack.imgur.com/jm7UT.png" alt="enter image description here"></li>
  </ul>
  
  <hr>
  
  <p>Resources:</p>
  
  <p>Entire application.html.erb file - <br/>
  <a href="https://gist.github.com/attatae/11016882" rel="nofollow noreferrer">https://gist.github.com/attatae/11016882</a><br/><br/>
  <a href="http://getbootstrap.com/css/#forms" rel="nofollow noreferrer">http://getbootstrap.com/css/#forms</a><br/></p>
  
  <p>(Here is a similar question but it did not really help me. Possibly I "missed" something but I've trying for a while with no luck.) <a href="https://stackoverflow.com/questions/13079845/rails-login-with-twitter-bootstrap-navbar-w-devise">Rails Login with Twitter Bootstrap Navbar (w/ Devise)?</a></p>