Superfish Supersubs <li> menu items width
I've been stuck on this one for some time now and would really appreciat开发者_Go百科e some assistance. I'm developing a superfish horizontal dropdown menu.
I would like to know how to, using supersubs, set the width of the dropdown menu items to that of the largest items width in the drop down.
The default is : $('ul.sf-menu').supersubs({ minWidth: 40, maxWidth: 41, extraWidth: 1 }).superfish();
I would like something like : $('ul.sf-menu').supersubs({ minWidth: 40, **maxWidth: auto or 100%**, extraWidth: 1 }).superfish();
I would appreciate any help at all.
Regards, Byron
supersubs min and maxwidth are in em's not % or pixels
I was having trouble with supersubs being a little buggy, and I figured out a superior CSS-only alternative. The drop-down <UL>
and it's <LI>
children should have no width set (or width:auto;
if needed, I suppose), and both should be set to display:block;
#nav li ul a { display:block; width:auto; white-space:no-wrap; }
You can see an example at http://epraxadev.com/clcnewport/comp/supersubs.html
精彩评论