Controlling the maximum size of a form control?

I have an table which has the following row with the code:

                        <TR>
                              <TD WIDTH="10">
                              </TD>
                              <TD ALIGN="RIGHT" WIDTH="70">
                                    Function:
                              </TD>
                              <TD WIDTH="100" ALIGN="LEFT">            
                                    <SELECT id=select1 name=select1>
                                          <OPTION>Dallas
                                          <OPTION>Mississippi
                                    </SELECT>
                              </TD>
                              <TD WIDTH="170">
                              </TD>
                              <TD ALIGN="RIGHT" WIDTH="60">
                                    Severity:
                              </TD>
                              <TD WIDTH="100" ALIGN="LEFT">
                                    <SELECT id=select1 name=select1>
                                          <OPTION>Dallas
                                          <OPTION>Mississippi
                                    </SELECT>
                              </TD>
                              <TD WIDTH="10">
                              </TD>
                        </TR>

It works great but when the option value gets longer or shorter
the control gets out of wack position wise relative to the whole page.

Is there a way to set the maximum and minimum size of a control not to exceed
a certain value like the maximum width = 50 for the control?

Thanks
eric07Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TTomCommented:
If by control you mean the select box, IE will resize the content to match the longest item.  I don't think you can control it other than by limiting the size of the elements.

I don't remember how NS handles this.

Tom
0
Jan LouwerensSoftware EngineerCommented:
I beleive you can use style sheets to limit the sizes of elements, no matter what data is contained within them (although it may only work in IE)
0
TTomCommented:
jl:

Have you tried this with a <select> list?

Tom
0
Jan LouwerensSoftware EngineerCommented:
yes, actually, but ONLY in IE. But I can't find the style sheets I used... and I've forgotten how to do it... something like the source being the DOM path???
0
autCommented:
Paste this code. However, it will work for IE4.x, IE5.x and the upcoming Netscape 5. It will not work for Netscape 4.xx, as netscape lacks full stylesheet support.

Of course, you can change the width (i set it to 100) as you please.


 <TR>
  <TD WIDTH="10">
  </TD>
  <TD ALIGN="RIGHT" WIDTH="70">
   Function:
  </TD>
  <TD WIDTH="100" ALIGN="LEFT">
   <SELECT STYLE="width: 100;" id=select1 name=select1>
    <OPTION>Dallas
    <OPTION>Mississippi
   </SELECT>
  </TD>
 <TD WIDTH="170">
 </TD>
 <TD ALIGN="RIGHT" WIDTH="60">
  Severity:
 </TD>
 <TD WIDTH="100" ALIGN="LEFT">
  <SELECT STYLE="width: 100;" id=select1 name=select1>
   <OPTION>Dallas
   <OPTION>Mississippi
  </SELECT>
 </TD>
 <TD WIDTH="10">
 </TD>
</TR>


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.