0

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:

image of input field with up and down arrows

Is there a better solution?

LNA
  • 1,427
  • 3
  • 24
  • 37

1 Answers1

2

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!