Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:00
Milonic Menu in Table with Offsets
Poster: shingy
Dated: Wednesday July 19 2006 - 0:33:17 BST
HI, I hope this is a quick one. I am working on a menu which is inside a table cell, has padding set at 4 and I want to increase the left margin.
Any ideas would be greatly appreciated.
This is the menu data I am using...
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
bgimage="http://www.shingy.com/active4/images/nav_bg.gif"
bordercolor="#CC0000";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="11px";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#ffffff";
offbgcolor="#CC0000";
offcolor="#ffffff";
onbgcolor="#990000";
oncolor="#FFCC00";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
padding=5;
pagebgcolor="#990000";
pagecolor="black";
separatorcolor="#";
separatorsize=0;
subimage="arrow.gif";
subimagepadding=2;
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
position="relative";
menuwidth="180px";
orientation="vertical";
style=menuStyle;
aI("text=First Aid Online;url=http://www.shingy.com/;");
aI("showmenu=Publications;text=Publications;");
aI("showmenu=Ordering;text=Online Ordering;");
aI("showmenu=News;text=News;");
aI("showmenu=FAQ;text=FAQ;");
aI("showmenu=Downloads;text=Free Downloads;");
aI("showmenu=Links;text=Links;");
}
Here is an example of the Work In Progress page:
http://www.shingy.com/active4/int5.htm
Poster: Ruth
Dated: Wednesday July 19 2006 - 4:53:43 BST
Hi,
You've got a couple of things kind of wrong in this.
You're embedded_main.js file should have only the main menu and a drawmenus at the end of it. All the rest goes into the menu_data.js file.
You seem to have all the menus in that embed file and also have a table data file which I have no idea what that is.
Your sub_data.js file [which is what I named it] would be the following. Please NOTE I put in a 'mainStyle' for the main menu. You will see it as mainStyle=new copyOf . This method allows you to use shorthand if all you are changing in a style is one or two items. It will use the menuStyle plus it will add whatever you have placed in the copyOf style, in this case the rawcss="margin:0 0 0 5"; which puts a left hand 5px margin in the main menu.
sub_data.js file:
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
bgimage="nav_bg.gif"
bordercolor="#CC0000";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="11px";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#ffffff";
offbgcolor="#CC0000";
offcolor="#ffffff";
onbgcolor="#990000";
oncolor="#FFCC00";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
padding=5;
pagebgcolor="#990000";
pagecolor="black";
separatorcolor="#";
separatorsize=0;
subimage="arrow.gif";
subimagepadding=2;
}
mainStyle=new copyOf(menuStyle);
mainStyle.rawcss="margin:0 0 0 5";
with(milonic=new menuname("Publications")){
style=menuStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;url=http://www.milonic.com/menusample1.php;")
aI("text=Vertical Plain Text Menu;url=http://www.milonic.com/menusample2.php;")
aI("text=All Horizontal Menus;url=http://www.milonic.com/menusample25.php;")
aI("text=Using The Popup Menu Function Positioned by Images;url=http://www.milonic.com/menusample24.php;")
aI("text=Classic XP Style Menu;url=http://www.milonic.com/menusample82.php;")
aI("text=XP Style;url=http://www.milonic.com/menusample86.php;")
aI("text=XP Taskbar Style Menu;url=http://www.milonic.com/menusample83.php;")
aI("text=Office XP Style Menu;url=http://www.milonic.com/menusample47.php;")
aI("text=Office 2003 Style Menu;url=http://www.milonic.com/menusample46.php;")
aI("text=Apple Mac Style Menu;url=http://www.milonic.com/menusample72.php;")
aI("text=Amazon Style Tab Menu;url=http://www.milonic.com/menusample74.php;")
aI("text=Milonic Home Menu;url=http://www.milonic.com/menusample78.php;")
aI("text=Windows 98 Style Menu;url=http://www.milonic.com/menusample13.php;")
aI("text=Multiple Styles Menu;url=http://www.milonic.com/menusample5.php;")
aI("text=Multi Colored Menu Items;url=http://www.milonic.com/menusample80.php;")
aI("text=Multi Colored Menus Using Styles;url=http://www.milonic.com/menusample7.php;")
}
with(milonic=new menuname("Ordering")){
style=menuStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}
with(milonic=new menuname("News")){
style=menuStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;");
aI("text=WebSmith;url=http://www.softidiom.com/?milonicmenu;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
}
with(milonic=new menuname("FAQ")){
style=menuStyle;
aI("text=Apache Web Server;url=http://www.apache.org/;");
aI("text=MySQL Database Server;url=http://ww.mysql.com/;");
aI("text=PHP - Development;url=http://www.php.net/;");
aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;");
aI("showmenu=Anti Spam;text=Anti Spam Tools;");
}
with(milonic=new menuname("Downloads")){
style=menuStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}
with(milonic=new menuname("Links")){
style=menuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}
drawMenus();
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
bgimage="nav_bg.gif"
bordercolor="#CC0000";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="11px";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#ffffff";
offbgcolor="#CC0000";
offcolor="#ffffff";
onbgcolor="#990000";
oncolor="#FFCC00";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
padding=5;
pagebgcolor="#990000";
pagecolor="black";
separatorcolor="#";
separatorsize=0;
subimage="arrow.gif";
subimagepadding=2;
}
mainStyle=new copyOf(menuStyle);
mainStyle.rawcss="margin:0 0 0 5";
with(milonic=new menuname("Publications")){
style=menuStyle;
aI("text=Plain Text Horizontal Style DHTML Menu Bar;url=http://www.milonic.com/menusample1.php;")
aI("text=Vertical Plain Text Menu;url=http://www.milonic.com/menusample2.php;")
aI("text=All Horizontal Menus;url=http://www.milonic.com/menusample25.php;")
aI("text=Using The Popup Menu Function Positioned by Images;url=http://www.milonic.com/menusample24.php;")
aI("text=Classic XP Style Menu;url=http://www.milonic.com/menusample82.php;")
aI("text=XP Style;url=http://www.milonic.com/menusample86.php;")
aI("text=XP Taskbar Style Menu;url=http://www.milonic.com/menusample83.php;")
aI("text=Office XP Style Menu;url=http://www.milonic.com/menusample47.php;")
aI("text=Office 2003 Style Menu;url=http://www.milonic.com/menusample46.php;")
aI("text=Apple Mac Style Menu;url=http://www.milonic.com/menusample72.php;")
aI("text=Amazon Style Tab Menu;url=http://www.milonic.com/menusample74.php;")
aI("text=Milonic Home Menu;url=http://www.milonic.com/menusample78.php;")
aI("text=Windows 98 Style Menu;url=http://www.milonic.com/menusample13.php;")
aI("text=Multiple Styles Menu;url=http://www.milonic.com/menusample5.php;")
aI("text=Multi Colored Menu Items;url=http://www.milonic.com/menusample80.php;")
aI("text=Multi Colored Menus Using Styles;url=http://www.milonic.com/menusample7.php;")
}
with(milonic=new menuname("Ordering")){
style=menuStyle;
aI("text=Product Purchasing Page;url=http://www.milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://www.milonic.com/contactus.php;");
aI("text=Newsletter Subscription;url=http://www.milonic.com/newsletter.php;");
aI("text=FAQ;url=http://www.milonic.com/menufaq.php;");
aI("text=Discussion Forum;url=http://www.milonic.com/forum/;");
aI("text=Software License Agreement;url=http://www.milonic.com/license.php;");
aI("text=Privacy Policy;url=http://www.milonic.com/privacy.php;");
}
with(milonic=new menuname("News")){
style=menuStyle;
aI("text=(aq) Web Hosting;url=http://www.a-q.co.uk/;");
aI("text=WebSmith;url=http://www.softidiom.com/?milonicmenu;");
aI("text=SMS 2 Email;url=http://www.sms2email.com/;");
}
with(milonic=new menuname("FAQ")){
style=menuStyle;
aI("text=Apache Web Server;url=http://www.apache.org/;");
aI("text=MySQL Database Server;url=http://ww.mysql.com/;");
aI("text=PHP - Development;url=http://www.php.net/;");
aI("text=phpBB Web Forum System;url=http://www.phpbb.net/;");
aI("showmenu=Anti Spam;text=Anti Spam Tools;");
}
with(milonic=new menuname("Downloads")){
style=menuStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}
with(milonic=new menuname("Links")){
style=menuStyle;
aI("text=Login;url=http://www.milonic.com/login.php;");
aI("text=Licenses;url=http://www.milonic.com/mylicenses.php;");
aI("text=Invoices;url=http://www.milonic.com/myinvoices.php;");
aI("text=Make Support Request;url=http://www.milonic.com/reqsupport.php;");
aI("text=View Support Requests;url=http://www.milonic.com/mysupport.php;");
aI("text=Your Details;url=http://www.milonic.com/mydetails.php;");
}
drawMenus();
This is in your embed_main.js file
Code:
with(milonic=new menuname("Main Menu")){
style=mainStyle;
alwaysvisible=1;
position="relative";
menuwidth="180px";
orientation="vertical";
aI("text=First Aid Online;url=http://www.shingy.com/;");
aI("showmenu=Publications;text=Publications;");
aI("showmenu=Ordering;text=Online Ordering;");
aI("showmenu=News;text=News;");
aI("showmenu=FAQ;text=FAQ;");
aI("showmenu=Downloads;text=Free Downloads;");
aI("showmenu=Links;text=Links;");
}
drawMenus();
style=mainStyle;
alwaysvisible=1;
position="relative";
menuwidth="180px";
orientation="vertical";
aI("text=First Aid Online;url=http://www.shingy.com/;");
aI("showmenu=Publications;text=Publications;");
aI("showmenu=Ordering;text=Online Ordering;");
aI("showmenu=News;text=News;");
aI("showmenu=FAQ;text=FAQ;");
aI("showmenu=Downloads;text=Free Downloads;");
aI("showmenu=Links;text=Links;");
}
drawMenus();
The sub_data.js file gets called up with the other menu files right after the body tag, and the main file gets called as you have it now in the table.
Hope that helps.
Ruth
Thank you, Thank You, Thank You...
Poster: shingy
Dated: Wednesday July 19 2006 - 16:45:26 BST
YEs I amnew to this, but all of what you said makes sense and works. Ruth, you are a rockstar.
Cheers