Font sizes in SubMenu?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Font sizes in SubMenu?

Post by whiskey3 »

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]
Wolf
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

subStyle=new copyOf(menuStyle); 
subStyle.fontsize=8; 
This viewtopic.php?t=4595 contains information on using the copyOf method to create a new style.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
whiskey3
Super Advanced
Super Advanced
Posts: 79
Joined: Fri Jul 18, 2003 8:47 pm

Post by whiskey3 »

Thanks worked great....
Wolf
Post Reply