Why not all styles for <input> work, in particular color ?

 .stay-input { background: none; width: 211px; height: 45px; opacity: 0.75; color: white; font-family: 'Roboto', sans-serif; font-size: 14px; } 
 <form> <input type="email" name="email-newsletter" placeholder="Subscribe our newsletter" class="stay-input"> </form> 

  • 2
    Everything works - you set the color to white : color: white; :) - Roman Grinyov
  • but in fact it is not white, but gray. And if you set any other (even red) - nothing changes - PolonskiyP
  • one
    Because you are styling an input, not a hint ( placeholder ). - user207618
  • exactly thank you - PolonskiyP

1 answer 1

Because you apparently want to style placeholder

 .stay-input { background: none; width: 211px; height: 45px; opacity: 0.75; font-family: 'Roboto', sans-serif; font-size: 14px; } ::-webkit-input-placeholder {color:#c0392b;} ::-moz-placeholder {color:#c0392b;}/* Firefox 19+ */ :-moz-placeholder {color:#c0392b;}/* Firefox 18- */ :-ms-input-placeholder {color:#c0392b;} 
 <form> <input type="email" name="email-newsletter" placeholder="Subscribe our newsletter" class="stay-input"> </form> 

  • Exactly, thanks !! - PolonskiyP