This is an expansion of a question I posted a while ago: http://stackoverflow.com/questions/3275997/fitting-a-uls-width-to-accommodate-the-menu-items
Is there a snippet of jQuery code that can adjust the width of every <ul> inside a certain <ul> to make sure the <li> items don't overflow? The menu looks something like this:
<ul id="menu">
<li>
<a href="javascript:;">Menu 1</a>
<ul>
<li><a href="javascript:;">Item 1<a></li>
<li>
<a href="javascript:;">Subitem 1</a>
<ul>
<li><a href="javascript:;">Subsubitem 1</a></li>
</ul>
</li>
</ul>
</li>
</ul>
If I don't adjust the <ul> correctly, the layout looks messed up as shown here:

You can take a look at the site I'm developing here if you need more information about the CSS or the general structure of the web page.
