element smaller than 1? I have one that should be smaller size="1", but I don’t know how to reduce ...">

Can you make a <input type = "text"> element smaller than 1?

I have <input>one that should be smaller size="1", but I don’t know how to reduce it. Can this be done?

I tried using fractions and decimals, but didn't work.

+3
source share
2 answers

Instead, you can assign a pixel width:

<input type="text" style="width: 4px">
+12
source

For type="text"no . At least not using the attribute size:

The width is in pixels, unless the type attribute is set to text or password. In this case, its value refers to the number of (integer) characters.

+3
source

Source: https://habr.com/ru/post/1771393/


All Articles