Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text-box width different between IE / FF / Chrome - Causing issues when textbox is filled with 'W's

We have an application that has a text field with a specified length - 4.

Chrome:Chrome Firefox: Firefox

Is there a way force Firefox / IE to use fixed-width spacing? This is an issue in the case of ID numbers, where the field is actually accepting the full input, but by default not displaying the full width (potentially causing user error if they are typing the field from the screen rather than copy/pasting).

like image 558
MrDuk Avatar asked Sep 30 '13 18:09

MrDuk


1 Answers

Instead try changing size attribute to 5. So in all browsers, it will fit.

<input size="5" maxlength="4" value="WWWW" id="txt">
like image 56
Harshan01 Avatar answered Sep 20 '22 10:09

Harshan01