Dynamic width workaround for IE
I have a jQuery drop down navigation that adjusts its width in accordance with the longest item in the list. This works perfectly in Firefox and Safari but for some reason in IE t开发者_StackOverflow社区he width is extended the entire length of the page. If I set a fixed width the problem is sort of solved, however then I need to worry about updating the width as the items in the list change.
Is there a (simple) workaround for specifying a dynamically changing width in IE?
Thanks.
width: auto;
should work, is that what you are using?
Try a display: inline-block;
on your ul
or div
or whatever contains the menu items.
精彩评论