Forum Moderators: open

Message Too Old, No Replies

Setting SELECT fields to same width?

Form issues with Netscape 4.7

         

Chuma

5:22 am on Oct 9, 2003 (gmt 0)

10+ Year Member



I am working on a web application that displays a number of SELECT fields on a form that I have been asked to modify so they all display at the same width.

On Internet Explorer 5.5+ this is easy due to cascading style sheets, but on Netscape 4.7 the fields display according to the width of the data they contain.

Is there any way of making all the SELECT fields the same width in Netscape also?

I am aware of the other problems with CSS in Netscape 4.7 and hope to find a solution within it's limits.

Thanks.

jetboy_70

10:30 am on Oct 9, 2003 (gmt 0)

10+ Year Member



Short answer: No.

There are no workarounds to get NN4 to fix the width of selects.

The only method I've used successfully is to use server-side code to truncate the number of characters in the individual options before display to stop them changing size. Instead of displaying:

1: Short option
2: Very long-winded sprawling option
3: Yet another long option that doesn't fit
4: Sort option 2

it displays:

1: Short option
2: Very long-winded sp...
3: Yet another long op...
4: Sort option 2

Remember that NN4 will inherit things like font settings from CSS applied to the form tag, so you can limit the damage by using a smaller version of a narrow font (such as Arial).

Chuma

10:21 pm on Oct 9, 2003 (gmt 0)

10+ Year Member



Wouldn't you know it, straight after I posted my question here the other person working on the problem fixed it.

All they did was add WIDTH='235px' to the SELECT fields which seemed to work.

Thanks.