Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spinner in Input Number on the left side

Tags:

html

css

Is it possible to style the spinner in a

<input type="number"/>

to be on the left side instead of the default right?

like image 794
amitben Avatar asked May 30 '15 07:05

amitben


2 Answers

Yes you can do that. All you have to do is add a direction property to the element and you're done.

<input dir="rtl" type="number"/>

good luck with that .

like image 180
M.R.Safari Avatar answered Sep 19 '22 01:09

M.R.Safari


On Chromium-based browsers you can use this non-standard trick, which will not affect the position of the negative sign.

[type=number]::-webkit-textfield-decoration-container {flex-direction: row-reverse}
like image 22
GetFree Avatar answered Sep 20 '22 01:09

GetFree