Lets first of all start with the search codes which you need to add in your blog. The codes are below:-
First
<form id="searchThis" action="/search" style="display:inline;" method="get"><input id="searchBox" name="q" type="text"/> <input id="searchButton" value="Go" type="submit"/></form>
Change the text in red to any text like search or hit you want to display in button to hit the search.
Your search box will appear like this below.
Second
If you want to add some styling like this new sample below:-
Use these codes
<form id="searchthis" action="/search" style="display:inline;" method="get">
<input id="search-box" name="q" size="25" type="text" style="background: #ccccff; border: 2px solid #000066"><input id="search-btn" value="Search" type="submit" style="background: #000066; border: 2px outset #ff0000; color: #ffffff; font-weight: bold;"></form>
Edit the colors or styling in red in above codes to change the styling of search box to adjust in your template.
Third
Now if you want to add image in place of search button like below:-
Use these codes:-
<form id="searchthis" action="/search" style="display:inline;" method="get">
<input id="search-box" name="q" size="25" type="text" value="Enter search terms"><input id="search-btn" value="Search" type="image" src="http://www.iconlet.com/icons/crystal09/16x16/search.png" style="margin-left: 5px; margin: 3px 0 0 5px;"/></form>
Change the image url in red above with the url of the image you want to use.and hope you would have no problem in using any of the codes.
Now How To place search Box at different places in blogger blog:-
To Place it in sidebar:-
Under Template->Page Elements tab, click “Add a Page Element” at the place where you want your search box to appear.
Select HTML/JavaScript and add the above codes.
If you want to place search box in header read this tuorial Embed search Box In Blogger Header.
I hope you will love this tutorial.







VERY AWESOME DUDE THX AND MORE POWER!
its very good
and its working also
thank you very much
Thanks for the tutorial ..
Very easy! Thank you!
Cheers for this!
So helpful! Thank you...
thx. for the excellent tutorial!!!
Thanks this added the final touch
I have one doubt. i created 10 blogs in blogspot. in these blogs one as home page other as sub pages, But problem is as these are separate blogs, each one has their own search. So can u provide me search box code, that has capability of search more than one blog.
like when user search in home blog. it has to search in remaining all 9 blogs that i hav created. is it possible? Please suggest me
This is very helpfull...especially how to change the style (i didnt know this)...but i have a question, if you could help me, i would really appreciate it... how can i position the search bar to whichever place/position of the blogger i want...i mean, is there a code, that defines the position of the search bar?
This is my blog: http://universumest.blogspot.com/
this is where i want to place the search bar: http://i463.photobucket.com/albums/qq358/raidenjunior/dsfsdfs.jpg
Thank you very much in advance!!!
Thanks so much for this! I've been looking for a way to do this for a while and yours was simple and easy. A few other codes did not work (from other sites) maybe because I am using tumblr...so I was happy to find this. Thanks again! --Grace
Awosome ..thnx
its not working in my blog, starting this code working properly but its not working. only one post result shown another results not shown. you can check also my blog postings in i think 170 posts. http://www.hollywood-boxoffice.blogspot.com
its not working on my site
thanks....
Hi Anshul,
I have a default search box in my blogger template. And after changing to a custom domain search is now totally dis functional. Can you help me in this. I know this is a bit off topic, but still if you could help me, it would have been really helpful.
@manuel i saw your codes.See this line
input class='textfield' name='q' size='24' type='text' value=''
make like this
input class='textfield' name='q' size='24' type='text' value='' id='s'
Its working but can I adjust the box height? I can only resize its width, not the height. Please reply fast!
@moderator see the second search code i have told that is blue color seach box.
And now see below codes what i have done is added height property only and now can increade heignt.
<form id="searchthis" action="/search" style="display:inline;" method="get">
<input id="search-box" name="q" size="25" type="text" style="background: #ccccff; border: 2px solid #000066;height:30px;"/><input id="search-btn" value="Search" type="submit" style="background: #000066; border: 2px outset #ff0000; color: #ffffff; font-weight: bold;"/></form>
Thanks anshul! It works perfectly. One more thing, I have added the search box on my header right next to RSS feed links (see for yourself at http://unitybond.blogspot.com) and made the background transparent.
Here's the prob, when I make the background transparent, the words inside the search box can't really be seen (cause its black). Is there any chance that I change just the font color?
@moderator i can't see any search box in your template but any how i saw it and understood your problem.Just as how i added height:30px; add this propery also there color:#fff; then it will become white.
Anshul, really sorry to trouble but whenever I try to add the code u said above, it keep showing Attribute name "color:" associated with an element type "input" must be followed by the ' = ' character. and also Open quote is expected for attribute "{1}" associated with an element type "color:".
Would u mind help me to edit the code? I just want the font in white while the background transparent. I can't put the embed codes here cause your blogger comment don't allow it.
Thanks a billion! By the way, my McAfee SiteAdvisor show me warnings about your site linked to Ziddu.com which poses browser breach. Hope u can look around.
Mine doesn't work. I recently got a custom domain name and it stopped working. Could it have something to do with that? Is there a way I could fix it?
I'm having the same problem, mine doesn't work. I recently got a custom domain, could it have something to do with that? I never had a problem before. How can I fix this? www.skinnytaste.com
@moderator you have to add it in style so add it just after height:30px;color:#fff; like this then it will accept.
@gina ya as you switched to domain so urls chnaged.So when they will all be indexed by google then will show up in search results.
Hi,
I have one problem with my search box – when I search for something it only shows results from posts on my front page, like the eight latest posts.
Do you have any idea what that's about?
Thank you.
@linus you have added google custom search i cant say may be you would have made some settings while making it.
Hi, yeah I know I got the Google custom search now. That one works ok.
But the question was about your search box code.
I removed the search box I got from your site just because of the problem I mentioned – that it only showed posts from the front page.
Hi Anshul, is it possible to have the search my blog codes that shows the names and few sentences of the posts instead of showing whole posts? Cause of the new blogger arrangement, i can only show 1-2 posts per page which defeats the purpose of putting a seach my blog function! Thanks! (:
@linus mine codes are fine as every one uses same codes and all templates have search inbuild like this.
@zoe ya i think for this if you you will show only post title on label pages hack may provide you solution for this.You can find for it in my blog.
Thanks Anshul for the quick revert! You mean you have the codes for "search this blog" that displays just titled and a few words of each post instead of the current whole posts reflected?
Hey Great post man thank u very much.
If I want the header of the search box, how I write the code.
The header like " Search:□Go!
□=search box
change this value n codes to any value="Search"
Just replace search with go
I have a problem with custom domain. Search box does'nt work. Any ideas? www.patiks.lt
Thank you! I kept finding directions on how to do it for the new templates style, but I'm using a Classic Template style, so this was perfect.
buddy this not helping me !
as this or any other search box of your tutorial is not able to search for the specific or any posts in my blog , u can check for ur self after visiting my blog !
please help !
the problem occured after i changed my blog url from http://swaranisking.blogspot.com to http://goooglehacker.blogspot.com, now even the default search box which blogger provides and which is the best which i like is not working so please help me !
will be waiting for ur answer !
thanks !
@hacker ya u changed url so it will take ime unless all your posts on new name are indexed well then it will start searching.It can take months.