Reputation: 1576
Is there a way to custom style/remove the yellow autofill background-color
that Google Chrome add to input boxes with autocomplete="on"
?
I found some solution out there, but they all remove the autocomplete feature or add an inset shadow to cover the yellow.
But i need to retain the autocomplete feature and use a custom background (linear-gradient) for the input.
Edit: I tried to override the stylesheet, but it isn't working, it might be a Chrome bug?
input:-webkit-autofill {
background-color: red !important;
}
Upvotes: 4
Views: 4174
Reputation: 21
Use the following code:
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;}
Upvotes: 2