Friday, July 12, 2010
   
Text Size

Creating a Custom Search Bar

Creating a custom searchBar is a very simple but effective way of manipulating your sites appearance
A simple searchBar with a single image can be achieved using very little code. The following example is a basic yet effective implementation. The rounded corders use CSS3.


 
<input type="search" id="searchBar1" />
 
 
#searchBar1 {
    background: #fff url("http://i54.tinypic.com/sev9l5.gif") scroll 2px 3px no-repeat;
    border: 1px solid #007EBF;
    height: 18px;
    padding-left: 20px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    }
 


We can go one further, adding a glow effect (CSS3) with a few extra lines of code:


 
<input type="search" id="searchBar2" />
 
 
#searchBar2 {
    background: #fff url("http://i54.tinypic.com/sev9l5.gif") scroll 2px 3px no-repeat;
    border: 1px solid #007EBF;
    height: 18px;
    padding-left: 20px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: 0 0 7px #007EBF;
    }
 


Or even change the color of the glow effect when the user clicks on the search bar:


 
<input type="search" id="searchBar3" />
 
 
#searchBar3 {
    background: #fff url("http://i54.tinypic.com/sev9l5.gif") scroll 2px 3px no-repeat;
    border: 1px solid #fff;
    height: 18px;
    padding-left: 20px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    -moz-box-shadow: 0 0 7px #007EBF;
    }
#searchBar3:focus {
    -moz-box-shadow: 0 0 7px #fff;
    }
 



escorts in israel | escort in tel aviv | Oligarch escorts | Oligarch Tel Aviv escorts | הזמנת נערות ליווי