SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2012
    Posts
    139
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Twitter Bootstrap : how to add an Icon to the standard Search box?

    I modified Bootstrap's default .navbar-search to communicate with SiteLevel to provide a search of only my site. That is working well

    But I can not figure out how to include a functioning clickable Search Icon (like Bootstrap's <i class="icon-search"></i> ) at the right side of the Search box.

    I can easily put the icon there, but it does not function. It does change the mousepointer to hover, but nothing happens when I click it.

    Help? My current code is below (without any icon):

    Greg

    <form class="navbar-search pull-right" method="get" action="http://www.sitelevel.com/query" accept-charset="utf-8">
    <input type="hidden" name="crid" value="c68vsk7d"/>
    <input type="text" class="search-query" placeholder="Search" name="query"/>
    </form>

  2. #2
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need a button, not just the icon, for example

    <button type="Submit"><i class="icon-search"></i></button>

    Put the above just before your </form> tag.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •