Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:46

Font sizes in SubMenu?


Poster: whiskey3
Dated: Friday December 15 2006 - 5:14:01 GMT

I want my font to be larger in the top Nav and smaller in the pulldown or submenu. How do I do this? The top Nav is 11 and I want the submenu to be like an 8. Thanks.

Code below.....

[code]//////////////////////////
// Global menu properties

fixMozillaZIndex = true;
_menuCloseDelay=500;
_menuOpenDelay=150;
_scrollAmount=3;
_scrollDelay=20;
_followSpeed=5;
_followRate=40;
_subOffsetTop=10;
_subOffsetLeft=0;


///////////////
// Menu styles

// baseStyle is for properties shared by mainmenu and submenus.
with(baseStyle=new mm_style()){
offcolor="#000000";
offbgcolor="#6495ED";
oncolor="white";
onbgcolor="#6495ED";
bordercolor="#6495ED";
borderstyle="solid";
borderwidth=0;
fontsize=11;
fontstyle="normal";
fontweight="bold";
fontfamily="Verdana, Arial";
padding=4;
//high3dcolor="#33CCFF";
//low3dcolor="#000099";
headercolor="#ffffff";
headerbgcolor="#000099";
separatorcolor="6495ED";
separatorsize=1;
overfilter="Fade(duration=0.2);Alpha(opacity=88);Shadow(color=#777777', Direction=135, Strength=5)";
//outfilter="randomdissolve(duration=0.3)";
}

// Style for mainmenu is mainStyle
mainStyle=new copyOf(baseStyle);

// Style for submenus is subStyle
subStyle=new copyOf(baseStyle);
subStyle.subimage="arrow.gif" [/code]


Poster: Ruth
Dated: Friday December 15 2006 - 19:19:39 GMT

Hi,

You need to create a second style for the submenus. The easiest way is to use copyOf method since you only want to change the font style. Once created make sure you assign whatever name you gave your second style to the submenus. Also, the menuStyle is the name of the main style, but you would put in that copyOf(menuStyle); whatever the name of your main style is.

Code:
subStyle=new copyOf(menuStyle);
subStyle.fontsize=8;


This http://www.milonic.com/forum/viewtopic.php?t=4595 contains information on using the copyOf method to create a new style.

Ruth


Poster: Ruth
Dated: Friday December 15 2006 - 19:22:21 GMT

Hi,

I just noticed you are already using copyOF, just put in the fontsize you want.

If you want a particular menu to have it, then just make another copy of naming it different and assign it to whichever menu you want to have that.

Ruth


Poster: whiskey3
Dated: Friday December 15 2006 - 22:45:32 GMT

Thanks worked great....