-1

Here is my CSS code:

input:focus::-webkit-input-placeholder { color:transparent; }
input:focus::-moz-input-placeholder { color:transparent; }

My CSS is not working on Mozilla Firefox. Please let me know what is wrong in my code.

Thanks in advance.

Jonathan Lam
  • 16,831
  • 17
  • 68
  • 94
Sandeep Kumar
  • 159
  • 3
  • 12

1 Answers1

2

According to CSS Tricks, the correct selector is:

::-moz-placeholder /* Firefox v19+ */
:-moz-placeholder  /* Firefox v18- */

(Because it seems you're using CSS3 selectors, you can just use the former)

You probably got this confused because Webkit has its own vendor prefix of -webkit-input-, but Firefox only has -moz- (without the input).

Jonathan Lam
  • 16,831
  • 17
  • 68
  • 94
  • @SandeepKumar If my answer works for you, please accept it (press the green check mark next to it) to show the SO community it is the right answer. Thanks! – Jonathan Lam Aug 23 '16 at 20:35