Friday, June 5, 2009

[jQuery] Re: Horizontal Superfish with 100% width

I think i solved the problem (at least in FF 3 and Safari 4 on my
Mac).

> #menu { width: 100%; float: left; display: table;}
>     #menu > ul { display: table-row; }
>     #menu > ul > li { display: table-cell; min-width: 20%; }

I don't see right now why it didn't work, but by changing line two and
three to
.tr { display: table-row; }
.ts { display: table-cell; min-width: 20%; }

and then adding
$("ul.sf-menu").addClass('tr');
$("ul.sf-menu > li").addClass('ts');

in $(document).ready… it all works.

Per

No comments: