0

I just want to add background color when input has a value. So I tried this way.

First add default background color when empty.

input:empty {
  background-color:white ;
}

Then I tried to detect not empty with

input:not(:empty) {
 background-color:green ;
}

Why this isn't working?

MarkNsu
  • 61
  • 7

0 Answers0