I'm building a Rails app. How can I build a search bar that contains the search button inside it? An example would be the Stackoverflow search bar at the top of the page. Here's my search bar so far:
<div id= "searchbar">
<%= form_tag things_path, :method => :get do %>
<p>
<%= text_field_tag :search, params[:search] %>
<button class="btn" type="submit"><i class="thing-search">Go</i></button>
<%#<div="Go"><%= submit_tag "Go", :name => nil </div> %>
</p>
<% end %>
</div>
You might want to take a loot at Bootstrap Button Groups. They're essentially exactly what you're looking for and rolling bootstrap into a rails app is fairly simple. At the very least it will give you a good design to work off of.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments