This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IE7 drop down problem

 
ReachVijay kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a drop down list box which has some 15 items in it, by which we can select only one item at a time. In IE6 the items in the drop down are appearing fine with a scroll bar coming in after click on items. But in IE7 all the items in the drop down list are appearing with out a scroll bar, due to which drop down is appearing in a bigger size.

Some where in google it was written that, by default in IE7 drop down is having fixed size of 30. If that is the case, is there any way that we can change it and reduce the size, so that dispalyed items will appear in scroll bar or is there any way that we can use css and change it.

Any help on this will be useful

Thanks
Vijay
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay,
Welcome to JavaRanch!

Have you tried using the "width" attribute in CSS?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not change the number of elements that appear in the options in the select element w/ scrollbar.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course not. I thought the original posted meant a horizontal scrollbar. Upon re-reading the post, your interpretation makes much more sense!
 
Andy Crane
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way is to make it a multi-select, then you define the number of options that display at one time, but they're always there, not just displayed on clicking the arrow and the user can select more than one.

That being said, I'd bet that someone, somewhere, has gotten all creative on this and came up with a jquery workaround.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic