Solved

combo box

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now