How can I correct this?

1 answer

danwellman 5600

As a test, try adding another <input type="text"> field and see if it is the same width as the text input or the password input. My guess is that it would be the same width as the text field. IE probably treats text and password inputs to be two completely separate things and probably applies slightly different padding, width or letter spacing to the them which results in the difference.

Try setting an explicit width on both fields in your CSS and see if that helps

@henry, try this in your CSS:

input { with:173px; }

That should set all input elements, regardless of their type, to the same uniform width. If you have checkboxes or radio buttons anywhere else on your site though, they will also pick up that width to, so in this case, add a class name to both of the input elements in question and use the class to set the style instead, e.g. .text-inputs { width:173px; }

For reference, 173px is the width that Firefox sets input elements by default, so this will help create consistency between browsers...

Answered about 8 years ago by danwellman
  • Thx Dan. I'm only slightly familiar with CSS, so I'll fiddle with it. Henry Fan about 8 years ago
  • You are a hero, Dan. +1 Abinadi Ayerdis about 8 years ago
  • lol, thanks :) danwellman about 8 years ago