redletterday
redletterday

Reputation: 21

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

Upvotes: 2

Views: 764

Answers (2)

Jacob
Jacob

Reputation: 78850

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

Upvotes: 0

mkoryak
mkoryak

Reputation: 57928

width: auto;

should work, is that what you are using?

Upvotes: 1

Related Questions