Transparent BG with colored sub menu BG?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
JesseLY
Beginner
Beginner
Posts: 5
Joined: Wed Mar 01, 2006 8:34 pm

Transparent BG with colored sub menu BG?

Post by JesseLY »

I would like to have my top level BG set as transparent, but the BG color on the sub menu set to a color. Is there any way to do this without images? I know how to set the transparency, but can't figure out how to set a color for the BG only (the transparency affects all levels).

Thanks...

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

Post by Ruth »

Hi,

Without your data file, it's kind of guesswork, but I would bet you are using only one style in all the menus, the same style in all the menus. If so, just make a different style and apply that to the submenus.

Take a look at the beginners forum, viewforum.php?f=14

You want to take a look at the styling the menu ones. Probably the second part is all you need, though each is very short and easy to read.

Ruth
JesseLY
Beginner
Beginner
Posts: 5
Joined: Wed Mar 01, 2006 8:34 pm

Transparent BG on sub menu only

Post by JesseLY »

Thanks for the info, Ruth. I have looked at the styling menu but don't see anything on this specific situation. My data files are below.

In the top part I set the offbgcolor to blank, so it's transparent. In the second part, the sub-menu called Modern, I want the BG color to be gray. Currently I have an image for the BG, but would prefer to just use a color. I've tried a number of different approaches but can't find the right way.

Thanks...

-Jesse


with(menuStyle=new mm_style()){
onbgcolor="";
oncolor="#ffffff";
offbgcolor="";
offcolor="#ffffff";
offcolorsubmenu="#000000";
bordercolor="#296488";
borderstyle="solid";
borderwidth=0;
separatorcolor="#2D729D";
separatorsize="0";
padding=5;
fontsize="75%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="black";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);";
outfilter="randomdissolve(duration=0.3)";
}


with(milonic=new menuname("Modern")){
style=menuStyle;
overflow="scroll";
aI("text=Project ABC123ZZZ;bgimage=images/nav_BG_gray.gif");
aI("text=Project DEF456ZZZ;bgimage=images/nav_BG_gray.gif");
aI("text=Project GHI789ZZZ;bgimage=images/nav_BG_gray.gif");
aI("text=Project JKL101ZZZ;bgimage=images/nav_BG_gray.gif");

}



Ruth wrote:Hi,

Without your data file, it's kind of guesswork, but I would bet you are using only one style in all the menus, the same style in all the menus. If so, just make a different style and apply that to the submenus.

Take a look at the beginners forum, viewforum.php?f=14

You want to take a look at the styling the menu ones. Probably the second part is all you need, though each is very short and easy to read.

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

Post by Ruth »

Hi,

You just posted only one style called menuStyle. Since you have only one style and that is the style you have applied to each menu they will all look the same. You can't make one style be different for different menus. You have to create two styles. That is what that part two was talking about, creating more than one style and using them in different menus.

From the section on doing styles in the beginners guide forum

Probably the most used way to create a second style - and easiest in the sense that it is something with which most are familiar - is to highlight, copy and paste the existing style you created for your main menu, change the style name, then change all the aspects you want to be different.
So you'd copy and paste your menuStyle and rename it to something else other than menuStyle. Then you'd change the things you want different, in your case the background colors. Then in the submenus you'd tell them to use that style instead of menuStyle..... style=whatever you named the second style.

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

Post by Ruth »

I just noticed you also have something called offcolorsubmenu="#000000";

That is not a menu parameter in the Milonic menu and won't do anything.

THere are links below my name to the different menu properties, style, menu and item.

Ruth
Post Reply