amitben
amitben

Reputation: 700

Spinner in Input Number on the left side

Is it possible to style the spinner in a

<input type="number"/>

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

Upvotes: 9

Views: 5643

Answers (2)

GetFree
GetFree

Reputation: 42424

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}

Upvotes: 5

Lukas Safari
Lukas Safari

Reputation: 1968

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 .

Upvotes: 18

Related Questions