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 ?
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.