Change font color of autofill input field
css, html
Solution
Try the below CSS
input:-webkit-autofill {
-webkit-box-shadow:0 0 0 50px white inset; /* Change the color to your own background color */
-webkit-text-fill-color: #999;
}
input:-webkit-autofill:focus {
-webkit-box-shadow: /*your box-shadow*/,0 0 0 50px white inset;
-webkit-text-fill-color: #999;
}
Problem
I've managed to change the background color of an autofilled input field from yellow to white with the following code: ``` input.login:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px white inset; } ``` However, changing the font color to grey simply by adding `color: #999;` doesn't work. How could I fix this? Many thanks!