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 ?
11-20-2012, 10:25 AM
As far as I am aware, you can't.
11-20-2012, 03:42 PM
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.
11-20-2012, 04:39 PM
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?