Monday, March 28, 2022

How to add custom search box widget in blogger (code)

With Search Box gadget, your readers will be able to search not just your posts, but web pages linked from your blog, your blog list, and link lists.

But this widget is very basic so we want apply a custom search box with a design you want.

Here are 5 stylish choice to pick from. Just copy the code below the search box that you want to add and follow the steps below:


Blogger Custom Search Box


<style type="text/css">
#searchbox{background:#d8d8d8;border:4px solid #e8e8e8;padding:20px 10px;width:250px}input:focus::-webkit-input-placeholder{color:transparent}input:focus:-moz-placeholder{color:transparent}input:focus::-moz-placeholder{color:transparent}#searchbox input{outline:none}#searchbox input[type="text"]{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizXRkrxNzEl2yFOl6fcsnAHw_gR0OCqKAo5Sdar59jROJidwzeAuIcFfnoIFZOz4LGYMdPOKKQO_NPLkkJBg8yswJ9OfCc4wtd02cen6StRVzGH3hJXl22QfRP5D6jBNAcYlnKBpKjWomO/s1600/search-dark.png) no-repeat 10px 6px #fff;border-width:1px;border-style:solid;border-color:#fff;font:bold 12px Arial,Helvetica,Sans-serif;color:#bebebe;width:55%;padding:8px 15px 8px 30px}#button-submit{background:#6A6F75;border-width:0;padding:9px 0;width:23%;cursor:pointer;font:bold 12px Arial,Helvetica;color:#fff;text-shadow:0 1px 0 #555}#button-submit:hover{background:#4f5356}#button-submit:active{background:#5b5d60;outline:none}#button-submit::-moz-focus-inner{border:0}
</style>
<form id="searchbox" method="get" action="/search">
<input name="q" type="text" size="15" placeholder="Type here..." />
<input id="button-submit" type="submit" value="Search" /></form>


Blogger Custom Search Box


<style type="text/css">
#searchbox{width:240px}#searchbox input{outline:none}input:focus::-webkit-input-placeholder{color:transparent}input:focus:-moz-placeholder{color:transparent}input:focus::-moz-placeholder{color:transparent}#searchbox input[type="text"]{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizXRkrxNzEl2yFOl6fcsnAHw_gR0OCqKAo5Sdar59jROJidwzeAuIcFfnoIFZOz4LGYMdPOKKQO_NPLkkJBg8yswJ9OfCc4wtd02cen6StRVzGH3hJXl22QfRP5D6jBNAcYlnKBpKjWomO/s1600/search-dark.png) no-repeat 10px 13px #f2f2f2;border:2px solid #f2f2f2;font:bold 12px Arial,Helvetica,Sans-serif;color:#6A6F75;width:160px;padding:14px 17px 12px 30px;-webkit-border-radius:5px 0 0 5px;-moz-border-radius:5px 0 0 5px;border-radius:5px 0 0 5px;text-shadow:0 2px 3px #fff;-webkit-transition:all 0.7s ease 0s;-moz-transition:all 0.7s ease 0s;-o-transition:all 0.7s ease 0s;transition:all 0.7s ease 0s;}#searchbox input[type="text"]:focus{background:#f7f7f7;border:2px solid #f7f7f7;width:200px;padding-left:10px}#button-submit{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwUNChyiLowx1W2gzTGGWhFENwnnA21z7bth8g6vZ2ULl_BI4KnODTH0SvQieQmuzSDSZGatkcVldCPtTY80N_LO8eG6zXfdv1LfxWSgXbIWI7fYy-u3QeVsxYOT-kJsj5pMP6S6rUtblF/s1600/slider-arrow-right.png) no-repeat;margin-left:-40px;border-width:0;width:43px;height:45px}
</style>
<form id="searchbox" method="get" action="/search" autocomplete="off"><input name="q" type="text" size="15" placeholder="Enter keywords here..." />
<input id="button-submit" type="submit" value=" "/></form>

Blogger Custom Search Box



<style type="text/css">
#searchbox{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZDF3UDu2x5SmRpjD9b5VETrMMRZdiplzU5-bCyaLj57CkO8T4WV1lYQuAFRNZ49GUWHXHXH66NOKFwAFZUxdUnvzISka7CGX8XSyV2rfC5kChr1677wDDzEYx7ST5TmMJqEMfi7Q6Rh_k/s1600/searchbar.png) no-repeat;width:208px;height:29px}input:focus::-webkit-input-placeholder{color:transparent}input:focus:-moz-placeholder{color:transparent}input:focus::-moz-placeholder{color:transparent}#searchbox input{outline:none}#searchbox input[type="text"]{background:transparent;margin:3px 0 0 20px;padding:5px 0;border-width:0;font-family:"Arial Narrow",Arial,sans-serif;font-size:12px;color:#828282;width:70%;display:inline-table;vertical-align:top}#button-submit{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG23gfRXTIvODLUK0SHKZpA0NJTfTNHFt8h9eKbfrdtHlsIu4IaTJptz7ZZ-aUAuLtOhiByJRENJysc5KE1CTgQ_u6b_RofK8jQz9Hh8IOqLKznGPpxe1m5V3Z6a_5vPwXO3sAb1R5L5x1/s1600/magnifier.png) no-repeat;border-width:0;cursor:pointer;margin-left:10px;margin-top:4px;width:21px;height:22px}#button-submit:hover{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyopHnot7Y3d8GOH8RNCzX_alzACtOVUa2pTPPSks54oMRFT8wQpyxiG87J3KdO2D_PLN2KG_v03mob9lTTHw9zBZvvSQejB19VsGya3oI2p1YZJQL5cvVIAMWErp44rs0xEGTyTQbFYGv/s1600/magnifier-hover.png) no-repeat}#button-submit:active{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyopHnot7Y3d8GOH8RNCzX_alzACtOVUa2pTPPSks54oMRFT8wQpyxiG87J3KdO2D_PLN2KG_v03mob9lTTHw9zBZvvSQejB19VsGya3oI2p1YZJQL5cvVIAMWErp44rs0xEGTyTQbFYGv/s1600/magnifier-hover.png) no-repeat;outline:none}#button-submit::-moz-focus-inner{border:0}
</style>
<form id="searchbox" method="get" action="/search" autocomplete="off"><input name="q" type="text" size="15" placeholder="search..." /><input id="button-submit" type="submit" value="" /></form>

Blogger Custom Search Box



<style type="text/css">
#searchbox{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEy-oXTctEEwVN3YvVbd8IuSCdef9SwWxSjGjOHiAIhDwrz5GFDspX1hV-qXyOLFlx8rcn99D3Z6hCEIyZ4KObqAlK5rXnAAILcJCL72YA-xijznS6B_roXaA-1srAD9I_bTX6Ie5Hpq6b/s1600/search-box.png) no-repeat;height:27px;width:202px}input:focus::-webkit-input-placeholder{color:transparent}input:focus:-moz-placeholder{color:transparent}input:focus::-moz-placeholder{color:transparent}#searchbox input{outline:none}#searchbox input[type="text"]{background:transparent;margin:0 0 0 12px;padding:5px 0;border-width:0;font:italic 12px "Arial Narrow",Arial,sans-serif;width:77%;color:#828282;display:inline-table;vertical-align:top}#button-submit{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDuFYUoZNevVAf2rqzgPth0QSg_Hz6deglM9RuM4A2gck32fvb0pLBc3w1KohAWmjZT8jAqoSkSU30oTr5b4ymmidKvUhCBFju71W14lXB-Xcm4bDaiw8NQkxWwuX_cAdsj2Nh3ki14MM0/s1600/search-button.png) no-repeat;border-width:0;cursor:pointer;width:30px;height:25px}#button-submit:hover{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4kqZ2_SceheQlBvJk4iSrPdHrvfj3BCDb9bPN7KZ5_ADUWKxH1fKkgsLxcI5ZhSt5zbyej9U5f_YumnyliQW-wS5o4E-SIWAKD2FQe1DSsNqUQcUM7Y3TvEwEtOjyCa35-mRZEfgwMwa0/s1600/search-button-hover.png) no-repeat}#button-submit::-moz-focus-inner{border:0}
</style>
<form id="searchbox" method="get" action="/search" autocomplete="off"><input name="q" type="text" size="15" placeholder="search..." /><input id="button-submit" type="submit" value="" /></form>



<style type="text/css">
#searchbox{width:280px;background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFjBnVgx_7-_DGDK1Rl4is_oywR_C_Y0Sdoh_pMSzUkPIqYnR2CxyVKwz1rRNuOBH6gggogxW7lDhuQSlQ0u3Ev5HQb2slIjQDi4HLi9tc0dGY-TgEWag9X1IaO5wjN3D_tET3PCCZsUaq/s1600/search-box.png) no-repeat}#searchbox input{outline:none}input:focus::-webkit-input-placeholder{color:transparent}input:focus:-moz-placeholder{color:transparent}input:focus::-moz-placeholder{color:transparent}#searchbox input[type="text"]{background:transparent;border:0;font:14px "Avant Garde",Avantgarde,"Century Gothic",CenturyGothic,"AppleGothic",sans-serif;color:#f2f2f2!important;padding:10px 35px 10px 20px;width:220px}#searchbox input[type="text"]:focus{color:#fff}#button-submit{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRc8Yrhy0-xzIr3ZeFjh5zL86HrQUQZ8QTOxXElmcv4U0cz886LFKlh-VZoCr-iJQqr9Lu3AjYwoPF7mslq5wujhM8ez39EJI8DH8lfpaVA3q9Bf67jfapaLx5iHrrAedrUvGPg_ZscMbi/s1600/search-icon.png) no-repeat;margin-left:-40px;border-width:0;width:40px;height:50px;cursor:pointer}#button-submit:hover{background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Y_lZmSAq26w0eKPI-osyxEOXTU8TcdK180iUiJXrzc_I7E7b1L07ehHvWi8_FNNII9kX2ufMw_aS0b2CeLgYbnjrefIPKoOgAW8Og6tqhNe7bhCfgz86-EiGwZuCre60d7Y5QNiF6ors/s1600/search-icon-hover.png)}
</style>
<form id="searchbox" method="get" action="/search" autocomplete="off"><input name="q" type="text" size="15" placeholder="Enter keywords here..." /><input id="button-submit" type="submit" value=" "/></form>

Steps : How to Add a Custom Search Box to Blogger

  1. Log in to your Blogger account, then go to Layout > click on the 'Add Gadget' link on the left side.
  2. Choose HTML/Javascript from the pop-up window > paste the code of the search box inside the empty box.
  3. Press Save.
Blogger Add HTML Widget


That's it!

There you have it. 5 stylish choices that will let you take advantage from all the great benefits of using search box, while still helping you make your blog stand out. After adding your new search bar, your visitors will be able to navigate through your site and get to the same place using both the box and the navigation bar.

No comments:

Post a Comment