How to implement your own like button in Android?

How do the various browsers handle input [type="search"] and add a clearing button? And how can that be reset to implement a custom clearing button?

  • I was creating a search function on a website where I added a custom button. The "button" was a input[type="reset"] that had a custom size and background image. In firefox it looked fine But in chrome a clear button was added. And in Safari, search input gets rounded and a button added. ignore the border radius on the reset. I removed it when testing in other browsers later.

  • Answer:

    Chrome and Safari use webkit. So this worked for both browsers to get rid of the default button. ::-webkit-search-cancel-button { -webkit-appearance: none; } In production I have various search features so I had to use the appropriate CSS selector to only select the input[type="search"] in the appropriate divs. To get rid of the rounded border in Safari I added these rules to affect that search input. outline: none;-webkit-appearance: none;

Juan Gallardo at Quora Visit the source

Was this solution helpful to you?

Other answers

I found following links very helpful: http://jsbin.com/sejuquta/1/edit http://jsfiddle.net/Q7fRB/1/

Tanmay Rajani

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.