1

Perhaps a stupid question:

Here is a screenshot of my login page with a text-input field where I set the background-color. In the developer tools the background color property shows up as red, but in the page it is still grey. Any ideas on how to change it to red?

enter image description here

edit: under computed it says:

enter image description here

edit: this issue might be related to the chromium browser. On Chrome the background color is red

Nik
  • 1,093
  • 7
  • 26

2 Answers2

0

As you can see

there is -internal-autofill-selected in computed tab

These are browser's default styles

Perhaps you should do to override it

#id_username,
input#id_username:-internal-autofill-selected {
    background-color: red  !important;
    color: #fff !important;
}
Kiran Shinde
  • 5,732
  • 4
  • 24
  • 41
  • 1
    i just tried it, but this doesn't seem to work either. it shows up on the computed tab but the outcome is still grey – Nik May 30 '20 at 10:13
0

Could you try this

input:-webkit-autofill { background-color: transparent; }

Gagan Deep
  • 1,508
  • 9
  • 13