Hello. I was wondering if you could set select menus to be of a certain length rather than stretching out for the longest option. Thanks on anything you give
You can use the size attribute: http://www.w3.org/TR/html4/interact/...ef-size-SELECT
This may not have the desired effect depending on what you actually want, plus which browser you use, as the specification leaves the actual implementation of select elements pretty much up to the user agent.
If I understand the question what you want to limit is the horizontal width of the display options associated with a particular select element.
Short ans: yes
BUT it will truncate the displayed values of the longer option elements (bad) and unfortunately 'word-wrap: break-word' is not support by any browser I've seen for 'option'.
Ignore my previous reply, I misinterpreted what you were asking. You could use Javawebdog's suggestion to style the select element's width. You probably do not need to set the option elements' width unless you also need it to be limited for some reason.
Ah yes I tried a simular thing and faced the truncation problem. I was pretty sure I had seen handle on one site or another. The maxlength application doesn't seem to be relevant now. There is generally one select I have which looks a bit out of place. It's rather rather long but of course the text in it is left aligned as well.
Don't worry about it Nogdog
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)