The issue I’m having is options in a select box flow over the edge of the page (hiding the scroll bar). I’m trying to restrict the width of the options using CSS. Please say if there is a better way…
This worked fine in IE8, but not in IE9. Seems okay in Firefox as well. Chrome ignores it as well, but makes sure the options don’t overflow off the page (like IE9).
I know the non-resizing of these was a bug that was fixed for IE9, but it is necessary (sometimes) to set a width limit.
Browsers implement
selectelements differently, often using built-in routines that are more or less immune to CSS. It is not even clear what you, or others using very long option texts, would like to happen—truncation, line-wrapping, horizontal scrolling, or what?The problem is best avoided by using concise option texts. They are supposed to be visible names for alternatives, not novels. If very long names are really a necessity, use a set of radio button instead of
select.