Main Menu shadows/3d/gradient

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ssalter
Advanced
Advanced
Posts: 12
Joined: Fri Jun 25, 2004 10:01 pm

Main Menu shadows/3d/gradient

Post by ssalter »

I am new with Milonic menus but I've tried to search through the forums for everything applicable. I still can't quite figure out how to make my main menu titles "3d" or "drop shadowed" or "gradient".

Note, I just want the top level menu title to be this way, I have another style definition for the submenus and items.

Here is my main menu style:

Code: Select all

with(mainmenu=new mm_style()){
onbgcolor="transparent";
oncolor="red";
offbgcolor="transparent";
offcolor="#ffffff";
padding=10;
fontsize="150%";
fontstyle="bold";
fontfamily="Verdana, Tahoma, Arial";
}
This works good to a point. Background is transparent so I just see white text with the background graphic behind. I mouseover and the main menu item turns red. So, how can I add a drop shadow effect, or a "3d" effect or a gradient type filter effect to those top level menus?

Thanks,
Steve

ps: Due to the ability to show up on top of PDF files loaded into an iframe, Milonic wins my "utterly fantastic software" award for the decade. :) I searched for solutions to that problem but to no avail until I discovered Milonic.[/code]
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Are you talking about putting a drop shadow on the menu? Which will only show in internet explorer, by the way? If so that is done with the overfilters

Code: Select all

overfilter="Shadow(color='#000000', direction=135, strength=3)";
That will give you a shadow effect on whichever menu you put the code in the style. So, if you only have one style it will appear on all menus, if you only want it on the main one, then you can make a second style by copying the main one, renaming it to something liek subStyle and just leaving out that code. The code would be put after the last thing you listed in your post as part of the global style.

Ruth
ssalter
Advanced
Advanced
Posts: 12
Joined: Fri Jun 25, 2004 10:01 pm

Post by ssalter »

Hi, thanks for the prompt response!

Ok, I have this now:

Code: Select all

with(mainmenu=new mm_style()){
high3dcolor="#ffffff";
low3dcolor="#000000";
onbgcolor="transparent";
oncolor="red";
offbgcolor="transparent";
offcolor="#ffffff";
padding=10;
fontsize="150%";
fontstyle="bold";
fontfamily="Verdana, Tahoma, Arial";
overfilter="Shadow(color='#000000', direction=135, strength=3)"; 
}
and the main (top level) menu is defined as:

Code: Select all

with(milonic=new menuname("Main Menu")){
style=mainmenu;
position="relative"
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;");
aI("text=WebTools;showmenu=webtools;");
aI("text=Departments;showmenu=departments;");
aI("text=Public Resources;showmenu=publicresources;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=MyMilonic;");
}
and my main menu looks like the following: (the red arrow points to the white menu text)


Image[/img]


It doesn't look like I am getting a drop shadow. Using IE6 on WinXP. Hmmm, I must be missing something obvious here.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Actually, there is a shadow but because you have a transparent background and no borders and the menu is over a dark color picture you are not seeing it. It's actually on the text, at least in ie5.5. Change the #000000 to #FF0000 [red] so you can test it and you will see it around the letters. Which will then be solid red when you mouseover so it won't have a shadow effect. If you put the shadow color #ffffff, which is the color of the text you will see it, and you will also see it when you mouseover because the red letters would look like they have a white shadow. Be careful using shadow because it can blur the letters if you make it too strong. I'd move it down to even 2 instead of 3 the shadow will still show but the letters won't looked smeared.

Ruth
Post Reply