Html css

Remove Yellow Field Background Color From Autocomplete In Chrome + Other Browsers

Posted by Weston Ganger on July 06, 2014

Common approach to solve this that doesnt work in chrome but might work in other browsers:


input:-webkit-autofill{
  background-color: white !important;
}

The approach that does work in Chrome:


input:-webkit-autofill{
  -webkit-box-shadow: 0 0 0px 1000px white inset;
}

It may be beneficial to combine these two rules into one block for all webkit browsers compatibility. Cannot confirm the background-color works in other browsers as I was only testing it for Chrome.


Posted in HTML / CSS and Tagged with css autofill 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts