How to change the color of the text of a placeholder

  • Hello, my question is already in the title.

    I try but without success to change the color of my placeholders. 😩

    I show you the html code for clarity. Thank you ☺

    0_1535708169700_Screenshot at août 31 11-32-28.png

  • You can use:
    class_name::placeholder { color: #000000 }
    My personal recomandation use as much path you can instead of the class name just to be sure your css is not overiten by other from the framework or any other third party.

  • I placed this in my app.styl

    $desired-color = purple
    color $desired-color !important
    &::-webkit-input-placeholder /* Chrome/Opera/Safari */
    color $desired-color !important
    color $desired-color !important
    color $desired-color !important

    May it helps

  • .my_class input::placeholder { }
    And for Microsof Edge and Internet Explorer
    .my_class input::-ms-input-placeholder { }

Log in to reply