1

I have one form having input[type="number"].

Placeholder shows reduced opacity on browsers. I want to show opacity:1 for input placeholders. It is showing correct for input[type="text"] but not for input[type="number"].

Not getting why is it so.

CSS:

input::-moz-placeholder{
  opacity: 1
}

textarea::-moz-placeholder{
  opacity: 1
}

Can anyone help me?

ketan
  • 19,129
  • 42
  • 60
  • 98

3 Answers3

1

Try marking the css as important so that would be rendered

input::moz-placeholder
{
   opacity:1 !important
}
Alex
  • 8,461
  • 6
  • 37
  • 49
bhanu.cs
  • 1,345
  • 1
  • 11
  • 25
0

It's a bug in firefox. Which seems not working in firefox.

Check Firefox bug And Firefox bug

ketan
  • 19,129
  • 42
  • 60
  • 98
0

try this with extended support

input[type="number"]::moz-placeholder { 
  opacity:1 !important;
}
input[type="number"]:moz-placeholder { 
  opacity:1 !important;
}
input[type="number"]::-webkit-input-placeholder { 
  opacity:1 !important;
}

input[type="number"]:-ms-input-placeholder { 
  opacity:1 !important;
}
Vineeta Mehta
  • 458
  • 1
  • 4
  • 10