How can I limit the number of displayed items in dropdown list? for example a list of countries, i want to show only 5 or 7 countries, then users can scroll to see the rest. is it doable with javascript? css? any way? Thanks
Hi, do you mean something like: <select name="country" size="5"> ... list of options (countries) </select> HTML: Then it's just HTML...
Nope, for example in this facebook form : http://www.facebook.com/ in the birthday, in the Day, when you click the arrow, you see 19 days, then you can scroll to see more. what if I want to show only 10 days there and people can scroll for more?
Ok, I see. As far as I know the way how drop down list is displayed, is based on browser and OS. At least classic select tag. You could accomplish it by custom javascript drop down list, but it's too much code to write here. Good start is google for 'javascript drop down list'. If you chose some code and have problems, just share it here...