forums
You are not logged in.
Hello,
I tried to tweak the configuration, but so far I was not able to force the submenu (1 level) to be as wide as the main menu width.
Has anyone an idea, that would be great.
Thanks a lot,
Thomas
Offline
Hi Thomas,
I replied to you by email on November 22nd, but I guess you haven't received my email so I just resent it.
Anyway, just in case I am going to post the solution here too - to achieve this you would need a small modification. For the purpose just include the following small add-on script after the link to the SmartMenus script core file "c_smartmenus.js" on the page - i.e.:
// make the first-level sub menus' width match the parent item's width
old_sH = c_sH;
c_sH = function(u) {
if (u.LV == 2) {
var s = c_styles[u.className][0];
u.style.width = c_gD(u.parentNode) - (c_oM ? 0 : s[0] * 2 + s[3] * 2) + 'px';
}
old_sH(u);
}In your specific case, I also did just one additional thing - I set the following in the last section of the configuration file "c_config.js":
// MAIN-MENU FEATURES ... -10, // X SubMenuOffset (pixels)
to make sure the first-level sub menus are aligned correctly.
Please let me know if you have any questions.
Thanks!
Offline