I want an input field in html which will take number input only (including decimal) with increment disabled. I have used following :
/* Hide Spin arrows on input type number */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
/* display: none; <- Crashes Chrome on hover */
-webkit-appearance: none;
margin: 0;
/* <-- Apparently some margin are still there even though it's hidden */
}
input[type="number"] {
-moz-appearance: textfield;
}
<input class="form-control" type="number" name="phone">
This works perfectly on Google Chrome with out any problem. But, It doesn't works on Firefox. Does anyone know where I am doing wrong ? Is there any other idea to get out of this problem ?
Thanks,
inputwithtype="number", but you are using aninputwithtype="text"?textfield with[type="number"]selector?