I have a problem with select box height. Is it possible to make select list shorter with css property or other way? see attached screenshot
Asked
Active
Viewed 738 times
3
-
1AFAIK there's nothing you can do with plain CSS to make it shorter. You'll probably need to look at a JS solution. – Billy Moat Apr 04 '13 at 08:40
-
1Setting a height would fix it but IE will ignore it. Check this: http://stackoverflow.com/questions/490036/setting-the-height-of-a-select-in-ie – Ahmad Alfy Apr 04 '13 at 08:41
-
1http://stackoverflow.com/questions/570642/height-of-an-html-select-box-dropdown – freshbm Apr 04 '13 at 08:46
2 Answers
2
Maybe you can try this trick:
<select onmouseover="this.size=10;" onmouseout="this.size=1;">
See the demo : http://jsfiddle.net/h9SKM/

Fredy
- 2,840
- 6
- 29
- 40
-1
What I suggested earlier does not work if you dont have multiple set on the select element makeing it a not general way of solving the problem.
AFAIK, there is no CSS-approach to this problem. You have to use Javscript,

Alex
- 423
- 8
- 23