Solved

combo box

Posted on 2003-12-12
5
3,486 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS style formatting? 2 28
JavaScript Loan Calculator Error 3 34
convert Systemjs to Webpack 3 72
CSS Scroll Center with Static Side. Like EE does. 2 27
This article discusses how to create an extensible mechanism for linked drop downs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

685 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