Wider dropdown based on text
Posted
by
oshirowanen
on Stack Overflow
See other posts from Stack Overflow
or by oshirowanen
Published on 2011-02-12T15:04:16Z
Indexed on
2011/02/12
15:25 UTC
Read the original article
Hit count: 275
I have the following script:
http://jsfiddle.net/oshirowanen/6SUwR/3/
How do I give the drop down section a dynamic width based on the characters in the dropdown? For example, if "navigation 1" was "this is the first item in the navigation", How do I make the width of the whole dropdown wider automatically, but without affecting the size of the navigation button which causes the dropdown the dropdown when mouseover'ed?
Basically, I don't want to text to wrap in the dropdown, but at the same time, I don't want to button for the dropdown to go wider.
© Stack Overflow or respective owner