9958
Views
2
Comments
Solved
Remove arrows from inputs of type number
Question

I want to create input boxes strictly for inserting numeric digits but i want to remove the up and down arrows that appear on the right side of the input box. How can i achieve this?

2018-08-27 08-29-35
Fábio Vaz
Solution

b_pal wrote:

I want to create input boxes strictly for inserting numeric digits but i want to remove the up and down arrows that appear on the right side of the input box. How can i achieve this?


b_pal,


Using this CSS: 

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0; 
}
UserImage.jpg
Tiji Varghese

You can easily do that using CSS . The solution above by Fabio does cover webkit however to do that on Mozilla you need to add the following :

input[type='number'] {
    -moz-appearance:textfield;
}

You can read more about it here : Remove arrows from inputs of type number

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.