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.
Is this what you’re after?
http://jsfiddle.net/lukemartin/W9TzP/
Basically just set the .container’s width to auto, and then took the background-color off of the .container and put it on each individual .nav_item. Also added some floats and clears so correct widths are set.
Hope that helps 🙂