Solved

Select tag drop down values.

Posted on 2006-11-15
7
199 Views
Last Modified: 2010-04-09
Hi experts,
   I have select box which has fix width let say 100px.
If options contains value which is more than width, then
how to show full value to user without increasing size of select.

manish.
0
Comment
Question by:Manish
7 Comments
 
LVL 11

Author Comment

by:Manish
ID: 17945843
after clicking on drop down arrow.
0
 
LVL 19

Expert Comment

by:VoteyDisciple
ID: 17946188
It may be possible with Javascript to show the full text of the item on hovering.  Without increasing the size of the box you don't really have any pure HTML/CSS options
0
 
LVL 11

Author Comment

by:Manish
ID: 17946292
so do you have javascript code?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Accepted Solution

by:
bowen18 earned 50 total points
ID: 17950585
0
 
LVL 11

Author Comment

by:Manish
ID: 17953798
But width is increasing in IE , i dont want that.
It is working correct in firefox.

 
0
 
LVL 11

Expert Comment

by:ethoths
ID: 17955768
You need to set the width using css...

        <asp:DropDownList ID="DropDownList1" runat="server" style="width:100px" />

or

        <select name="DropDownList1" id="DropDownList1" style="width:100px"></select>
0
 
LVL 12

Expert Comment

by:jessegivy
ID: 17975888
There are no easy options here.  I've tried to get tooltips to work with option tags with no luck.  The other option would be to dynamically add multiple options and write lengthy code to link multiple options together.  The short answer and most accepted I believe, is to truncate the text, or simply increase the size of your dropdown and accomodate in your design.

...the standard if you decide to truncate is to use elipsis (...) at the end to indicate there's more text that's not being displayed.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.php tree directory? 5 56
Split in Javascript 5 31
Materializecss - Different Behaviors in Browser's 1 20
Removing HTML elements using javascript 4 17
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 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

17 Experts available now in Live!

Get 1:1 Help Now