Can't change text color on inputs (placeholder text color)

Can't change text color on inputs (placeholder text color)
0

#1

hi i’ve been trying to change the text color on my forms inputs for days, just stuck.
generally seems like it should be simple, just:

input {
background-color: black;
color: white;
}

but it won’t work, i’ve tried getting specific with input “types” no joy, i feel like is has something to do with hierarchies but can’t sort it out. the odd thing is it will change the color of the “submit” buttons text…
i don’t know if anyone can take a look at my pen and see if they spot something i’d appreciate it.


#2

Hi, @awmeadows. I applied background-color: black; and color: white; to your input rules and they did change color.


#3

that’s weird, when i do it the background-color always works, but the text color stays light gray.
light gray an white are really similar, if you try say “magenta” does it work for you?
it definitely doesn’t work for me.


#4

Maybe you meant the placeholder text?


#5

exactly, that’s what i meant, sorry new to this, will get better with specifics


#6

Did a quick search, and it turns out it’s been asked in StackOverflow.

Skimmed a bit and it seems it can get a bit dirty. Hope that helps :slight_smile:


#7

input {
background-color: black;
color: white;
}
changes the whole pen and does not change a background color of placeholder input box