set width of select box

Results 1 to 3 of 3

Thread: set width of select box

  1. #1
    Join Date
    Dec 1969

    Default set width of select box

    Can you set the width of a select box, or is it always the width of the longest item?<BR><BR>You can set the number of vertical items displayed with the size attribute, but I can&#039;t see to set the horizontal width to a set value.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Cross-browser problems...

    To be safe, I put in a dummy last item that is all blanks (you must use &amp;nbsp; instead of just spaces) and *also* set the width in the style. &#060;SELECT ... style="width: xxx;"&#062;<BR><BR>See and my "dual lists in HTML" demo. It works in all browsers tested thanks to doing both those things.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Cross-browser problems...

    Using style-sheets is the easiest way to accomplish this, however, as Bill suggests, this probably won&#039;t help those using older browsers.

Posting Permissions

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