You are here:Home » Blogger Guide » Search Box Widget For Blogger and Websites Using CSS

Search Box Widget For Blogger and Websites Using CSS

Today i am going to share awesome search box widget for blogger. Every blogger needs search box widget on their blogs to make easy to visitor to find the posts. So if you want to add awesome search box widget to your blog follow below steps.

Search Box Widget

Add CSS Code to Your Blog.

  1. Go to Template Section and Edit HTML.
  2. Find ]]></b:skin> and copy below CSS code and paste above it.

CSS Code;

.inner-box{
 width:100%
 height:auto;
 padding:50px;
 text-align:center;
 border-radius:25px;
}
.search {
 margin:10px;
 -moz-box-shadow:inset 0px 1px 0px 0px #ffffff;
 -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;
 box-shadow:inset 0px 1px 0px 0px #ffffff;
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) );
 background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% );
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9');
 background-color:#f9f9f9;
 -webkit-border-top-left-radius:42px;
 -moz-border-radius-topleft:42px;
 border-top-left-radius:42px;
 -webkit-border-top-right-radius:42px;
 -moz-border-radius-topright:42px;
 border-top-right-radius:42px;
 -webkit-border-bottom-right-radius:42px;
 -moz-border-radius-bottomright:42px;
 border-bottom-right-radius:42px;
 -webkit-border-bottom-left-radius:42px;
 -moz-border-radius-bottomleft:42px;
 border-bottom-left-radius:42px;
 text-indent:0;
 border:1px solid #dcdcdc;
 display:inline-block;
 color:#666666;
 font-family:Arial;
 font-size:20px;
 font-weight:bold;
 font-style:normal;
 height:50px;
 line-height:50px;
 width:600px;
 text-decoration:none;
 text-align:center;
 text-shadow:1px 1px 0px #ffffff;
}
.search:hover {
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) );
 background:-moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100% );
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9');
 background-color:#e9e9e9;
}.search:active {
 position:relative;
 top:1px;
}
.sbutton {
 -moz-box-shadow:inset 0px 1px 0px 0px #f29c93;
 -webkit-box-shadow:inset 0px 1px 0px 0px #f29c93;
 box-shadow:inset 0px 1px 0px 0px #f29c93;
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #fe1a00), color-stop(1,
#ce0100) );
 background:-moz-linear-gradient( center top, #fe1a00 5%, #ce0100 100% );
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fe1a00', endColorstr='#ce0100');
 background-color:#fe1a00;
 -webkit-border-top-left-radius:42px;
 -moz-border-radius-topleft:42px;
 border-top-left-radius:42px;
 -webkit-border-top-right-radius:42px;
 -moz-border-radius-topright:42px;
 border-top-right-radius:42px;
 -webkit-border-bottom-right-radius:42px;
 -moz-border-radius-bottomright:42px;
 border-bottom-right-radius:42px;
 -webkit-border-bottom-left-radius:42px;
 -moz-border-radius-bottomleft:42px;
 border-bottom-left-radius:42px;
 text-indent:0;
 border:1px solid #d83526;
 display:inline-block;
 color:#ffffff;
 font-family:Arial;
 font-size:18px;
 font-weight:bold;
 font-style:normal;
 height:50px;
 line-height:50px;
 width:150px;
 text-decoration:none;
 text-align:center;
 text-shadow:1px 1px 0px #b23e35;
}
.sbutton:hover {
 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ce0100), color-stop(1, #fe1a00) );
 background:-moz-linear-gradient( center top, #ce0100 5%, #fe1a00 100% );
 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ce0100', endColorstr='#fe1a00');
 background-color:#ce0100;
}.sbutton:active {
 position:relative;
 top:1px;
}

Add HTML Code to Blogger. 

  1. Go to your blogger Dashboard and select your blog.
  2. Go for Layout.
  3. Click on Add a Gadget option.
  4. Go for HTML/JavaScript widget.
  5. Now copy the below code and paste it of the work area.
  6. Now Save the widget.

HTML Code;

<div class='inner-box'>
<form action="/search" method="get">
<input class='search' name="q" size="40" type="text" placeholder="Search / Ask Your Questions "/>
<br/>
<input class='sbutton' value="Search" type="submit"/></form>
</div>