jquery resize li based on a string size
<p>I have some query which will calculate the pixel width for each li.
problem is it doesnt take into consideration the amount of characters in an A href.</p>

<p>You might get "Cartouches/Réservoirs" and it will attempt to assign 124px width based on the calculation of the other items.</p>

<p>I need to check first if the number of characters will fit in the assigned size, if they dont then increase the size by remove some from an LI that has sufficient space.</p>

<pre><code>$('div#new-menu-lower ul li').css('width', ($('div#new-menu-lower ul').width() / $('div#new-menu-lower ul li').length));
    $(function() {
        var menuWidth = $('div#new-menu-lower ul').width();
        var listItems = $('div#new-menu-lower &gt; ul &gt; li').length;
        var itemWidth = Math.floor(menuWidth * (1/listItems)) - 20;

    $('div#new-menu-lower ul li').css('width', itemWidth);
}); 
</code></pre>

<p>Here is the demo: <a href="http://jsfiddle.net/zwqYf/3/" rel="nofollow">http://jsfiddle.net/zwqYf/3/</a></p>

<p>As you can see when you hover the items are broken.</p>

<p>Is there anyway to get round this?</p>
