Disable Input Number Field Arrows from CSS

Browsers are now implementing html5 input fields and ugly arrows appearing inside input type=number fields on different sites. Here’s the code to disable them.

For now only Chrome alike browsers, Opera and Mozilla have implemented type=number arrows.

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

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

Yeah, you can’t remove arrows from Opera yet, but they look pretty decent there at least.

Share:
This entry was posted in CSS CheatSheets and tagged . Bookmark the permalink.

6 Responses to Disable Input Number Field Arrows from CSS

  1. That is working in Chrome, opera, mozilla etc

  2. dwi ade says:

    Thank you it’s working on mozzila

  3. VietKong says:

    Thanks you so much. It’s working on mozzila

  4. Varghese says:

    While the arrows do look a little inconsistent across devices the are a very useful feature. I guess most of the users don’t mind using it now.

Leave a Reply

Your email address will not be published. Required fields are marked *