Chaya Cooper
Chaya Cooper

Reputation: 2530

Color for styled placeholder text is muted in Firefox

I've changed the color of my placeholders with the relevant vendor prefixes and it's displaying properly in other browsers, but for some reason Firefox mutes the colors a bit.

::-moz-placeholder, input::-moz-placeholder {color: Black;} 

I've used both :-moz-placeholder and ::-moz-placeholder prefixes. Any suggestions?

Upvotes: 1

Views: 1068

Answers (2)

saikiran.vsk
saikiran.vsk

Reputation: 1796

I think you are expecting this, just try this once,

input[type="text"]:hover::-moz-placeholder {
    color: #000000;
}

above is for text inputs if you need for all inputs remove [type='text']. Okay

Upvotes: 0

Boris Zbarsky
Boris Zbarsky

Reputation: 35084

The default placeholder style has an opacity different from 1, so that if you change the input color the placeholder automatically ends up with a slightly muted version of that color.

Try setting opacity: 1 in addition to the color.

Upvotes: 3

Related Questions