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

10,158

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

<input size="5" maxlength="4" value="WWWW" id="txt">
Share:
10,158
MrDuk
Author by

MrDuk

I help make it possible for 12 year olds to scream at you.

Updated on July 26, 2022

Comments

  • MrDuk
    MrDuk over 1 year

    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).