Currently I'm using
<input type="text">
If I use <input type="number">
, the problem is that in Chrome the input field starts to look like this, with up and down arrows:
Is there a better solution?
Currently I'm using
<input type="text">
If I use <input type="number">
, the problem is that in Chrome the input field starts to look like this, with up and down arrows:
Is there a better solution?
Just add this to your css file to remove the arrows.
form input[type='number']::-webkit-outer-spin-button,
form input[type='number']::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
Source: http://thanewoidan.com/articles/14/hide-default-input-type-number-up-down-arrows-in-chrome
Hope that helps you!