Return to the Web Authoring Forum | Post a Follow-Up

 o
Form's text box size wrong in Netscape? help?

Posted by
Rob Peters
(robpet@swbell.net) on
Fri, Jul 27, 01 at 0:56

I've got a site built that works great on IE, but has problems in Netscape. One of the most frustrating problems is that in Forms my text input box in Netscape does not pay attention to the size setting. For example suppose I write within my form text field:

input type="text" name="occupation_comment" size="35" value"engineer"

In IE this works nicely and the input text box is 35 characters long. In Netscape the box is approximately 65 characters long and destroys my layout. Any ideas how to make Netscape behave itself? Thanks very much, Rob Peters.


Follow-Up Postings:

 o
RE: Form's text box size wrong in Netscape? help?

hmmm,.. that is strange. Never heard of the input-tag not properly displayed by Netscape. Which browser-version of NN are you using? Do you use style-sheets for the style of the input-tag (that can be a problem in NN and MSIE). Is the input-tag placed inside a table-cel?

Perhaps you can post back the link to the site the shows the problem.

Niels.


 o
RE: Form's text box size wrong in Netscape? help?

I have the same problem with text input fields in Netscape 6. Text fields are inside table cells and Netscape makes them approximately 1/3 too long no matter what the cell widths are. I use a self-declared css class in which I have declared the font sizes and types. The field size can't be delared in stylesheet because the html for input fields is generated by an xsl-template which should be able to be used for different-sized fields. It's a big problem because I have a very limited space in the frame..


 o
RE: Form's text box size wrong in Netscape? help?

Not that this is a helpful answer, but lots of stuff that works fine in I.E. doesn't work fine in Netscape. Netscape parses tables differently, doesn't handle a lot of the script well, etc.

--JoJo


 o
RE: Form's text box size wrong in Netscape? help?

Sorry I can't help you but I wanted to declare that I am having the same exact problem. I hate Netscape. It always gives me problems. I posted a message today regarding table borders that I hope someone can help me with.

But as for the form problem with Netscape ... I would love to know if you found anything, Rob.

Thanks,
Cara


 o
RE: Form's text box size wrong in Netscape? help?

People at other forums sent me the following. Perhaps this will help for someone:

I found thet following explanation at http://www.saila.com/usage/tips/?print#textfield. He has some other good tips too.

Here's what he says:
Unfortunately, both Netscape and Internet Explorer display form fields using different criteria.

Because, Netscape uses the browser's monospaced font to render text in a text field, and IE uses a variable font generally sans-serif typeface it's best to optimize the box for Netscape first.

Once you've done that, use a style declaration (which older Netscapes will ignore) to stretch the box for Internet Explorer.

Here are three examples. RIGHT CLICK WITH YOUR MOUSE AND CHOOSE "VIEW SOURCE" TO SEE THE SOURCE CODE FOR THE THREE BOXES.
A plain Netscape 4.7 text input box:

An IE 5.5 text input box, styled to match the size of the Netscape box (the padding helps vertically align the text):

An IE 5.5 text input box, styled to match the size and look of the Netscape box (the border and font simulate Netscape's):

--------------------------
Another guy suggested this not great solution: "I decrease the NS size by using the style "font-family: new courier" for input boxes. But it doesn't decrease them as much as I'd like."

--------------------------

Another guy says: "I have the same problem with text input fields in Netscape 6. Text fields are inside table cells and Netscape makes them approximately 1/3 too long no matter what the cell widths are. I use a self-declared css class in which I have declared the font sizes and types. The field size can't be delared in stylesheet because the html for input fields is generated by an xsl-template which should be able to be used for different-sized fields. It's a big problem because I have a very limited space in the frame."

--------------------------
In my own case, I took a not-great dummy approach. The problem with over-sized NS 4.7 boxes only occurred when I was using Styles. Without styles, the box behaved in NS. So I stopped using styles for that page. It made some other stuff look not so hot, but I was willing to sacrifice to get those NS boxes the right size.

Here is a link that might be useful: tip on text box size and other tips


 o Post a Follow-Up

Please Note: Only registered members are able to post messages to this forum.

    If you are a member, please log in.

    If you aren't yet a member, join now!


Return to the Web Authoring Forum

Information about Posting

  • You must be logged in to post a message. Once you are logged in, a posting window will appear at the bottom of the messages. If you are not a member, please register for an account.
  • Please review our Rules of Play before posting.
  • Posting is a two-step process. Once you have composed your message, you will be taken to the preview page. You will then have a chance to review your post, make changes and upload photos.
  • After posting your message, you may need to refresh the forum page in order to see it.
  • Before posting copyrighted material, please read about Copyright and Fair Use.
  • We have a strict no-advertising policy!
  • If you would like to practice posting or uploading photos, please visit our Test forum.
  • If you need assistance, please Contact Us and we will be happy to help.


Learn more about in-text links on this page here