Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NS4 Resizable Selectbox

Status
Not open for further replies.

louistaub

Programmer
Sep 21, 2001
20
0
0
GB
I would like to produce a select box in Netscape 4, that will adjust in size when the window is resized and fill the width of the table cell. I have tried the following code.

Code:
<form>
<TABLE cellSpacing=0 cellPadding=0 width=&quot;100%&quot; border=0>
<TR vAlign=top>
<TD width=&quot;33%&quot;>Inputs/Outputs</TD>
<TD width=&quot;33%&quot;>Accessories</TD>
<TD width=&quot;33%&quot;>Voltage</TD></TR>
<TR vAlign=top>
<TD width=&quot;33%&quot;><SELECT id=i size=7 name=io style=&quot;width:100%&quot;><option>optihjghjgghjon</SELECT></TD>
<TD width=&quot;33%&quot;><SELECT id=ac size=7 name=accessories style=&quot;width:100%&quot;><option>option</SELECT></TD>
<TD width=&quot;33%&quot;><SELECT id=vo size=7 name=voltage style=&quot;width:100%&quot;><option>option</SELECT></TD></TR>
</TABLE>
</form>

This code works fine in Internet Explorer.
Anyone got any ideas on how to get the same effect in Netscape 4.

Thanks

Louis Taub
 
netscape 4 reacts pretty badly in general to any resizing of the browser window. :-(

one way around this is to reload the page onresize something like

<body onresize=&quot;if(document.layers)window.location.reload();&quot;>

hope this helps

rob
 
I've already got the refresh incorporated in my code. The main problem is that Netscape ignores the 'style=&quot;width:100%&quot;', as I am trying to get the select box to fill the width of the table cell.

Any more ideas?

Louis
 
I had similar NS4 <SELECT> problems (the size issue).

I had to &quot;pre-fill&quot; the options with dummy data to get the desired width.
 
I think I'll have to give up on this problem. I tried the pre fill method but the problem with that is that when the window is then made smaller the select boxes stay the same width. Thanks anyway.


Louis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top