Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make HTML5 number input’s spin box always visible on chrome just like mozilla? [duplicate]

Current behaviour on chrome is it's shown only when a user hovers over it:

enter image description here

By default, that spin box is not visible:
enter image description here

but in Mozilla, it's always visible:

enter image description here
How can I make spin box always visible in chrome?

https://jsfiddle.net/JerryGoyal/u4qoLcp4/

<input class="FlaggingPeriodTextBox" style=" width: 61px;    text-align: right;font-family: Segoe UI;margin-top: 9px;" type="number" min="1" max="999" value="7">
like image 984
GorvGoyl Avatar asked Feb 08 '23 10:02

GorvGoyl


1 Answers

jsFiddle

input[type="number"]::-webkit-outer-spin-button, 
input[type="number"]::-webkit-inner-spin-button {
opacity: 1 !important;
}
<input class="FlaggingPeriodTextBox" style=" width: 61px;    text-align: right;font-family: Segoe UI;margin-top: 9px;" type="number" min="1" max="999" value="7">

--

like image 67
Miro Avatar answered Feb 10 '23 23:02

Miro