File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes drop down list display issue 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 "drop down list display issue" Watch "drop down list display issue" New topic
Author

drop down list display issue

Kristin Stromberg
Ranch Hand

Joined: May 17, 2005
Posts: 91
I have a drop down list with four or five items, each of which can be very very long (longer than the width of the dialog box the list appears in). The [select] element has a fixed width of 500px. In Netscape and Firefox, this is working great, because when you click on the drop down list, the options are displayed in a box that is as wide as it needs to be (wider than the 500px of the [select] element, if necessary).

Here's an example of good behavior (Netscape & Firefox):



Problem is that in IE, the box is only as wide as the [select] element it's a part of, so the right margin is cut off at 500px and nobody can tell what they're selecting.

This is very, very bad (Explorer):



I've tried messing around with the word-wrap attribute in IE, but haven't managed to get it to work with either the [select] element or the [option]elements (it's supposed to work with both, according to MSDN).

Any suggestions? The work-around for now is to not limit the width to 500px, but this is ugly, and we don't like ugly! Thanks in advance...
[ November 16, 2005: Message edited by: Kristin Stromberg ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Welcome to the world of "I hate Microsoft's rendering to the seelect element."

There is nothing you can do to show the hidden part of the text, only thing that you can do is toopen it full size.

Eric
Kristin Stromberg
Ranch Hand

Joined: May 17, 2005
Posts: 91
Darn! Thanks Eric - you just saved me from wasting another couple of hours trying to fix this.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60056
    
  65

What we need is a variant of this smilie:



that replaces the brick wall with an instance of IE.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: drop down list display issue
 
Similar Threads
Problem with Combo box
Problems with SELECT width
Problems with select box width
MS Access - how to read query
Drop-down: How can I make the list bigger than the drop down