Home | All Questions | alt.html FAQ >

How do I get the input fields the same size in NN and IE?

This is most probably caused by something that makes the browser(s) use a proportional font for the text in the input field. It is a known problem in Netscape that it allocates the physical width for an input field by multiplying the SIZE value by the maximum width of a character. Well, approximately so.

On the other hand, replacing the FONT-FAMILY value e.g. by Courier, monospace does not reduce the width, though it makes the behavior more logical. And if you use "Courier New", Courier, monospace and your browser has Courier New in its disposal, you will see one reason why fixed font sizes, especially tiny sizes like 10px, are not a good idea at all on the WWW.

The best approach is probably just input { font-family: Courier, monospace; } and omitting all font-size rules (i.e., letting the font size to be what the user has selected).

Recommended Resources

Discussion

Related Questions