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 


Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts