How can I fix the length of a combo box

Results 1 to 3 of 3

Thread: How can I fix the length of a combo box

  1. #1
    Join Date
    Dec 1969

    Default How can I fix the length of a combo box

    Is it possible to fix the length of a combo box or does the text dictate this size ?<BR>

  2. #2
    Join Date
    Dec 1969

    Default Come on, somebody!

    In IE you can set the size with &#060;select style="width:200px;"&#062;, but it doesn&#039t work in Nutscrape. Lottsa people want to know, why doesn&#039t anybody answer??

  3. #3
    Join Date
    Dec 1969

    Default There are no combo boxes in HTML

    A "combo box" is an ActiveX control that allows the user to *either* select from a drop down list *or* to type in a new value at will.<BR><BR>Now, having established that...<BR><BR>If you mean "How do I control the width of a &#060;SELECT&#062; list?" then the answer is "carefully." Unfortunately, MSIE 4, MSIE 5, and Netscape all require slightly different ways. MSIE 4 and Netscape will allow you to simply put in a "dummy" element (I make it the last one) that is just the appropriate number of spaces to pad to the needed width. MSIE 5 ignorese the spaces *but* does pay attention to a width specified via a STYLE. MSIE 4 will also pay attention to a style width, but only if it is specified in &#060;STYLE&#062; section, not "inline". Netscape (at least version 4.7) ignores &#060;STYLE&#062;. So...the answer is to *both* put in a dummy padding element *and* to specify the style.<BR><BR>You can see an example of my doing this at and the two "dual lists" demos (one in JS code, one in VBS...since the latter obviously runs only on MSIE, I don&#039t need the dummy padded option for that demo...take a look at both).<BR><BR>Hokay?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts