Create search bar

Asked

Viewed 12,056 times

0

I am creating a website and designed the search bar. The problem is that I don’t know how to activate it or that it works with my site in html. There is an easy way using google search boxes on our site but the design I designed for the search bar is different from google’s. Someone helps?

inserir a descrição da imagem aqui

Ignore the two blue vertical scratches. I want to create this search bar I just don’t know how to create and after it works.

  • 1

    You have to be more specific, if possible post some prints, the code and describe what you expect to do, the result to be obtained, and without worrying about how you will get to it, because in this we can help you.

  • 1

    Is the site completely HTML? I believe that to create a search system, you will need to improve the backend of your site, that is, use PHP/ASP/ASP.Net...

1 answer

4

To use your own search box in Google’s custom search, you must create a custom search engine. Go to "Appearance" and select the "Layout" tab". inserir a descrição da imagem aquiChoose the "results only" option and then click "save and get code" You will be taken to a page where the code is that you should paste into the font of the page where you want the results to appear on your site. There is a "Specify Search Results Details" button. By clicking this button, there will be a field with the parameter to pass the query to the query, which by default is "q". This parameter must be equal to the value of the "name" attribute in the text field of your search box. The "action" attribute of the form in your search box must be equal to the address of the page where you want the search to appear, that is, where you placed the previously mentioned code.

<form method="post" action="pagina_de_resultados.html">
  <input type="text" name="q" value="Pesquisar...">
  <input type="submit" value="Pesquisar">
</form>

  • I know how to do this with google. Look at the design I made of the box. I don’t think you can apply this design to a google search box. I appreciate your help even if it wasn’t what you wanted (so far) it will certainly be useful for many people who don’t know how to add google search box.

  • maybe if you use CSS, you can change the layout of the google search bar

Browser other questions tagged

You are not signed in. Login or sign up in order to post.