Forum Moderators: open

Message Too Old, No Replies

The size of Input fields in Netscape

         

IanKelley

10:33 am on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Since as far back as I can remember Netscape has displayed form fields differently than IE. To be specific, Netscape makes them muuuch longer. This problem continues in version 6... In fact it seems to be worse.

In the days of Netscape 4.x I just allowed some extra space for the fact that Netscape was going to display the fields larger.

I've now discovered that in version 6 it is displaying <input> and <textarea> fields all the way to the edges of whatever space they are in (i.e. a table cell)

Anyone know a way around this?

Brett_Tabke

10:48 am on Dec 7, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Nope, all browsers display input fields differently. Even different versions of browsers display them differently. Not much you can do, but leave enough space for those that overflow. (and not be to shocked when it looks nothing like you'd envisioned on another browser or platform).

There are even browsers (gasp) that allow you to specify what font to use for forms and form fields. I'm using a 9pt terminal font here right now with 162 columns input width for this message. (I think you know which browser I'm using [searchengineworld.com].)

joshie76

10:51 am on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The input textbox size varies from browser to browser and with different font sizes (i.e. a large or small fonts installation in Windows NT/2000 etc).

A quick trick to setup the same textbox to be roughly the same size on both NN4 and IE is as follows:

<input type="text" size="10" style="width:70px">

Netscape will ignore the width in the style attribute and use the size.
IE will ignore the size and use the width in the style.

Adjust each value to get the box appearing as you wish and Voila, approximately the same size textbox in both browsers.

J

tedster

5:39 pm on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nice, Joshie! A simple resolution to a niggling problem.

Marshall

7:11 pm on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



From my experience, it seems if you set the input field size at say 20, IE and Opera displays it at 20, NN4 at around 35 and N6 around 45. I just make sure I leave a lot of room for expansion.

IanKelley

10:01 pm on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks joshie... that's exactly what I was looking for. Sounds like something I'd think of :-)

Leaving room wass not an option. It worked for NS4.x but with NS6 the size difference is enough that I'd have start designing for screen resolutions above 800x600 in order to "leave room" ;-)

BTW- Someone changed the title of my post from: "Netscape is S**an". Why did you do that? We're talking about a joke... not profanity and definitely not somthing that's offensive to anyone but the most anal of people.

Anyway, I suppose censorship is your prerogative but if you're going to leave it changed, do me a favor and remove the sub title since it no longer makes sense.

txbakers

10:14 pm on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Josh - brilliant!

And just think, Netscape was so wonderful and IE so awful only a few short years ago.

What happened???

tedster

11:13 pm on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>> Someone changed the title of my post...

One of our admins changed it, to make it stand out better to the site search engine. I don't want to seem repressive, so I changed it back.

In general, one of the things we moderators and admins tune into is that we are all building a knowledge base here for future use. With that in mind we do try to keep titles descriptive and threads on-topic -- and sometimes we edit and split threads, etc, to improve things for the future user.

No offense intended. After all, you did use a smilie!

IanKelley

11:30 pm on Dec 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



To tx... AOL happened :-)

To ted... I understand. Although I'm thinking that the phrase Netscape is Sa**n should get a lot of search hits :-)

Mark_A

12:09 am on Dec 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I must say that I thought you could influence NN a bit more by formatting input fields in css.. Seem to recall that it reduced but did not eliminate the problem you mention.

tedster

1:40 am on Dec 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, the moderators have been tossing this one around, and the consensus is that this thread's title needs to be descriptive of its content. There's some good info in here and we want it to be easy to locate.

And now back to our regularly scheduled programming.

When the layout needs very tight control, I deliver two different versions of form inputs -- sometimes wholly different pages and sometimes just a different css file. In this case, I think that sniffing for Netscape is the best road to precision.

Marcia

4:39 am on Dec 8, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Great topic here, just transitining to CSS on sites and all kinds of issues will be coming up, I'm sure.

Thanks joshie, I'm re-doing a form on one site now that's being switched from a million font tags to CSS and that'll save loads of grief.

Ian, check your StickyMail

Brett_Tabke

7:03 am on Dec 8, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Apologies for not msg'ing you Ian. (I should have when I changed the title). As far as I could tell, the title didn't reflect the post content.

For the benefit of members, all titles must reflect the content of the post. We average 80-150 active threads per day. Many users scan the active list or the subboards index page (titles of posts) to see if there is anything interesting in the post.

Does "Netscape is Satan" reflect the content of the post? If so - we have a problem.
Yes I did change the title and would do it again.

Titles are extremely special cases. Titles go:
- on the active list,
- on the title of the page,
- get indexed by search engines,
- into the site search engine, and finally
- into new email post and response notifications.

They are used by everyone when viewing forums. They are extremely special cases. One of the top complaints of all time in Usenet and in many forums is against posts whose title does not reflect the page content.
--
I am figuring out where to put the above on the board. I'll see if I can link it next to "title" on post creation and special mention in the help files.

Sorry Ian; again, I should have messaged you about it.

<added>The message compose screen has been updated to reflect the above.</added>

MikeFoster

2:12 pm on Dec 8, 2001 (gmt 0)

10+ Year Member



Here's a trick I use. It works well except for textareas.
Use a monospace font and give the font size in pixels.
Then set the number of chars with the size attribute of the input tag.

<input type="text" size="10" value="0123456789" style="font-family:monospace; font-size:16px;">

IanKelley

12:17 am on Dec 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Actually I've used that method before... you're right, it does help, but it still doesn't make the display in netscape and IE close enough when it comes to input and textarea fields in tight spots.

IanKelley

12:24 am on Dec 9, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Alright... about the title of this thread...

I understand, no worries. Let's not take something this miniscule too seriously, k?

DrOliver

2:33 pm on Mar 21, 2002 (gmt 0)

10+ Year Member



This article on WebMonkey is a great resource too:

To Webmonkey's article about form element sizes in different browsers [hotwired.lycos.com]