File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes IE7 drop down problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "IE7 drop down problem" Watch "IE7 drop down problem" New topic

IE7 drop down problem

ReachVijay kumar

Joined: Jun 20, 2009
Posts: 1

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

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

Welcome to JavaRanch!

Have you tried using the "width" attribute in CSS?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can not change the number of elements that appear in the options in the select element w/ scrollbar.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

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

Joined: Dec 30, 2008
Posts: 17
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.

- andy c
"Pseudo code first. If you can pseudo code accurately, when you start writing code, you're just applying syntax to the pseudo code. It separates the two most complicated pieces of programming into manageable bites. You create your app's workflow without worrying about syntax. Then you code without worrying about your app's workflow."
I agree. Here's the link:
subject: IE7 drop down problem
It's not a secret anymore!