html - Internet Explorer 11 "n" char based width doesn't fit "n" characters -


i'm building app requires char ("ch") width components. in ie11 doesn't seems working.

for example:

<input style="width: 5ch; padding: 0; margin: 0; font-family: monospace" maxlength="5"> 

the width don't fit 5 characters. knows why? couldn't find answer anywhere.


plnkr example here


edited: i'm using monospace family fonts unlike question

better use size attribute:

the size attribute gives number of characters that, in visual rendering, user agent allow user see while editing element's value.

input {    padding: 0;    margin: 0;    font-family: monospace;  }
<input size="5" maxlength="5">


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -