bootstrap put search form to right

I make a search form by bootstrap, it is on left, but I want to put the form to right. How to make it?

code:

<%= form_tag search_path, method: :get, class: "form-inline col-sm-4" do %>
  <div class="form-group">
     <%= text_field_tag :search, params[:search], class: "form-control", placeholder: "Search for..."%>
  </div>
  <div class="form-group">
    <%= submit_tag "Search", class: "btn btn-primary" %>
  </div>
<% end %>

Answers


use class="pull-right" class like:

<div class="pull-right">
 <%= form_tag search_path, method: :get, class: "form-inline col-sm-4" do %>
  <div class="form-group">
   <%= text_field_tag :search, params[:search], class: "form-control", placeholder: "Search for..."%>
  </div>
  <div class="form-group">
  <%= submit_tag "Search", class: "btn btn-primary" %>
  </div>
 <% end %>
</div>

Need Your Help

comparing integer value in if statement in bash

bash if-statement

When I run a C program named anom, which returns 0 or 1 in a script: