-1

I tried by changing color in body, didn't work well

Also, i tried doing instead of using body{ , using placeholder { , didn't work either

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  color: #ffffff;
  background-color: #333;
}
<input type="text" placeholder="Placeholder..." />
Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Kn1gh7
  • 11
  • 1

2 Answers2

0

placeholder can be accessed by ::placeholder pseudo class.

So, if your input element's id is testinput then your css can be

#testinput::placeholder {
   color: blue;
   font-family: Arial;
}
Ozgur Sar
  • 2,067
  • 2
  • 11
  • 23
0

Here is your solution. Style the placeholder with the non-standard ::placeholder selector.

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: red;
  opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: red;
}

::-ms-input-placeholder { /* Microsoft Edge */
  color: red;
}

You have more info here: https://www.w3schools.com/howto/howto_css_placeholder.asp

George Tiganila
  • 519
  • 1
  • 5
  • 18