My input tags look fine in NN but in MSIE they are considerably shorter and it's a real pain. Is there any way to force MSIE to display INPUT tag lengths in the same way as NN does?
Who is Participating?
nettromConnect With a Mentor Commented:
size="100" and style="width:100px" aren't equivalent since the input is of type "text", see

Netscape will ignore the style setting since it's not good at applying style properties to form elements.

I'd say that it's impossible to get the input field to be the exact same size in both IE and Netscape.  create it with a size that fits (in other words, set it to be the default number of characters you'd like), and then see how it works out.  if IE sizes it incorrectly, try applying a width using the style attribute.  using values relative to the font size of the user might be what you're looking for, e.g:

<input type="text" name="test" size="40" style="width;40em;">

for more information regarding style & CSS, see or the CSS2 spec (the part where values is defined is )
You can try this script to make the input box longer :
<input type = text name = myTextBox style = "width : 100">

and this code will make a 100 pixel width text box in IE
-- Holy Spirit
or you can try this:
<input type="text" name="myTextBox" size="100">
...this should achieve the same effect as Holy Spirit's suggestion.
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

HolySpirit's suggestion is different from chaduka's suggestion. The former specifies the exact size in pixels.
lhuttonAuthor Commented:
Explanations, please! I've just discovered some things I wasn't aware of...

It seems that without a size (or style) attribute, NN automatically makes the width of my input tag the width of the table cell. Is it supposed to do that? When I use a style tag, IE takes notice but NN still makes it the width of the table cell, whether the width is set to 2 or 2000!!

This is really bizarre. I would love to hear from someone, some explanations as to what's happening here :)
<input type="text" name="myTextBox" &{"size=4"}; size="4">
lhuttonAuthor Commented:
Thanks nettrom. That explains things better :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.