Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendations for dropdown menu items that are too wide?

What kinds of options do I have when a dropdown menu is faced with text that is so wide that extending the menu's width to accommodate is not feasible? i.e. It breaks the page layout, or just looks too ugly if the dropdown is adjusted to fit the long item.

Truncation? Truncation plus full hover text? Don't allow items that long?

Anyone encountered any elegant solutions to this?

Thanks.

like image 890
ntownsend Avatar asked Feb 25 '09 16:02

ntownsend


People also ask

How do I change the width of a drop-down list in Excel?

Widening Drop-down Lists The simple solution is to widen the column that the drop-down box is in. You can adjust the column manually by dragging the border of the column header.

How do you customize a drop-down list?

On the worksheet where you applied the drop-down list, select a cell that has the drop-down list. Go to Data > Data Validation. On the Settings tab, click in the Source box, and then change your list items as needed. Each item should be separated by a comma, with no spaces in between like this: Yes,No,Maybe.

How many items should be in a drop down?

In General, Avoid Drop-Downs When There Are More Than 10 or Fewer Than 5 Options. Drop-downs quickly become difficult for users when they are presented with an overwhelming number of options to choose from. Take, for instance, a commonly included input in checkout forms, the “Country Selection” drop-down.


2 Answers

I realise I'm fairly late to this question, but I've been hunting for an answer and I may have found a fairly elegant solution.

Have a look here:

  • http://www.getharvest.com/blog/2009/12/dropdown-problems-on-internet-explorer/
  • http://www.dougboude.com/blog/1/2008/05/Viewing-Option-Text-in-IE7-thats-Wider-than-the-Select-List.cfm

The first link talks about a couple of solutions before recommending a solution based on the second link.

The idea is that on click, you change the width of the <select> tag such that it is big enough to show the full text of the options. By keeping the <select> tag inside a div with overflow set to 'hidden', it doesn't screw with the rest of the page.

Try it out - it's a pretty good solution.

like image 75
Damovisa Avatar answered Oct 19 '22 13:10

Damovisa


Truncation with tooltip would be my choice....

The last time i had to do that i used a telerik control, which was quite UI rich.

like image 3
GordonB Avatar answered Oct 19 '22 11:10

GordonB