htmlcssplaceholdermicrosoft-edge

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


I can't change the input placeholder color in Edge Browser.

:-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 any way to make it work using CSS?


Solution

  • 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