Results 1 to 4 of 4

Thread: ListBox: fixed width

  1. #1
    Join Date
    Nov 2012

    ListBox: fixed width

    Hi.., I have a listbox ​​that is dynamically loaded from a table of a Database (mysql)​.
    I put a width of 100px to the list but when the list is displayed (drop down) the width don't keep in 100px. When drop down, the width of list is set to the width corresponding to the register with more characters found in the table. I mean, it gets wider. I need the list remains with equal width, when open and when closed.

    how do you do the drop down list has the same width when the list is closed ?


  2. #2
    Join Date
    Mar 2012
    As far as I am aware, you can't.

  3. #3
    Join Date
    Aug 2012
    Options will resist most styling. The select and its options are defined by the OS and the browser has limited access to the properties. Even direct access to the properties in the DOM using scripting will not override the OS definition of the properties.

    I've done some playing with option styling for this article, but I have never found a way to alter the width.
    one of my toys And my repository and my old self ranting plus a bonus Getting the most out of Q/A sites
    Code that is 100% standards compliant is 100% correct 100% of the time... anything else is just a hack

  4. #4
    Join Date
    Mar 2012
    On second thoughts, if the pick list entries are stored in a fixed width database field, it should be possible to set the width wider than the widest entry?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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