Solved

combo box

Posted on 2003-12-12
5
3,485 Views
Last Modified: 2010-05-18
When combo boxes are set using 'width:300px', they all look tidy, but when they are populated with data of different length, some data gets cut short in drop-down. However, without the width setting, combo boxes get expanded and out of control when the data populated. What can I do to keep them look tidy but all the data can be shown in drop-down.
0
Comment
Question by:luotuo
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:dorward
ID: 9926820
There is no such thing as a combobox in HTML. I suspect you mean a select element, which is often rendered as a drop down list (a combobox is a dropdown list combined with a text box so the user can pick an option or type their own).

The only solution is to avoid excessivly long option labels.

You could also consider switching from a select element to a series of radio buttons. Radio buttons are more flexible when it comes to layout.
0
 

Author Comment

by:luotuo
ID: 9927109
Thanks.

Well, I cannot really do that as there are 6 drop-down lists on my jsp web page, and each of them is populated with data from database, and each of them may hold about more than 10 records.  Is there some sort of horizontal scrollbar to those drop down lists?
0
 
LVL 17

Accepted Solution

by:
dorward earned 125 total points
ID: 9927124
Browser dependent.   select { overflow: auto; } might work on some, but I doubt it.
0
 

Author Comment

by:luotuo
ID: 9927174
I doubt it too. But will give it a go anyway.

Thank you very much!
0
 

Author Comment

by:luotuo
ID: 9927211
Would you pls change my grade to this question to A. It page processed before I could change my choice.

Thanks.

http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_20823847.html#9926820
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question