Change background color for autocompleted inputs in Google Chrome
Google Chrome (and other webkit browsers) change the background color to yellow on autocompleted inputs inside a form.
The most common approach that most people try is something like this:
input:-webkit-autofill {
background-color: white !important;
}
However the code above does not work. For some reason Google Chrome ignores that CSS rule.
A good workaround for this is this simple hack:
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;
}
No more ugly autocompleted forms :)
Written by Javier Cuevas
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#