I have a form where i saved my login credentials. Now chrome is showing its own background color to the input fields.
I did research for this but didn't found anything.
Is there any way to overwrite user agent stylesheet which is coming from chrome only with css?
Asked
Active
Viewed 3,714 times
2

Deepak Pahwa
- 31
- 1
- 5
-
1Possible duplicate of [Google Chrome form autofill and its yellow background](http://stackoverflow.com/questions/2920306/google-chrome-form-autofill-and-its-yellow-background) – CBroe Oct 04 '16 at 18:20
1 Answers
1
Yes you can change the styles like so:
/* Change Autocomplete styles in Chrome*/
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus
input:-webkit-autofill,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
border: 1px solid green;
-webkit-text-fill-color: green;
-webkit-box-shadow: 0 0 0px 1000px #000 inset;
transition: background-color 5000s ease-in-out 0s;
}
Follow the article for more info: https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/

Bartek Maki Makoś
- 174
- 1
- 10