views:

30

answers:

2

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 the 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.

+1  A: 
width: auto;

should work, is that what you are using?

mkoryak
I was originally using a min-width of 1px but I just tested width: auto; and that produces the same 100% width problem in IE.
redletterday
A: 

Try a display: inline-block; on your ul or div or whatever contains the menu items.

Jacob