On Edge Browser, how to change input placeholder text color using CSS?

Muthu Kumaran picture Muthu Kumaran · Aug 19, 2015 · Viewed 22.9k times · Source

On Edge Browser, I couldn't able to change input placeholder color.

:-ms-input-placeholder is not working but works fine on IE 10 & IE 11.

input:-ms-input-placeholder {
    font-style:italic;        
    color: red;
    background-color: yellow;
}

is there anyway to make it work using CSS?

Answer

Paulie_D picture Paulie_D · Aug 19, 2015

From CanIUse.com

::-webkit-input-placeholder for (Chrome/Safari/Opera)

:-ms-input-placeholder for IE.

::-ms-input-placeholder for Edge (also supports webkit prefix)

Note the double colon syntax