Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the apparently un-removable input type="search" border in Chrome

I've tried quite a bit of stuff... but the border just won't go away. Works fine if you were to replace type="search" with type="text", but I'd hope that's not what I'm required to do.

I'm trying to kill it with

input{
    background:transparent;
    border:0;
    border-color:transparent;
    outline:none;
    width:150px;
}​

but none of them seem to do the job.

http://jsfiddle.net/Kf9Mu/

Any ideas?

like image 645
Bilal Akil Avatar asked Jun 03 '12 23:06

Bilal Akil


1 Answers

Apparently Webkit has a custom style for search input fields. You can get rid of it directly then apply your own borders. I removed it here and gave it a red border.

input{
  -webkit-appearance: none;
  border: 1px solid red;
}​

http://jsfiddle.net/Kf9Mu/7/

I've only looked at this in Chrome.

like image 172
Shane O'Connor Avatar answered Oct 13 '22 11:10

Shane O'Connor