devxlogo

Determining Size of an INPUT Field

Determining Size of an INPUT Field

Question:
How can I determine the maximum size of an INPUT field?

Answer:
Although you can certainly use JavaScript to find out the size of your user’s screen or the size of their browser window, this information doesn’t help much when you want to set the size of your form INPUT fields. This is because the browser and the user’s platform dictates how form elements are displayed and you have very limited control. In addition, on some platforms, like Windows 95/98/NT, users can customize the size and style of the fonts used by the system. This makes setting the size of your INPUT controls even harder. There isn’t much of a work-around for this issue. The only thing you can do is test, test, test.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist