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

Is it possible to have sub-menu items each a different color


Poster: dmacman
Dated: Tuesday November 1 2005 - 13:20:23 GMT

Hi All,

I was wondering, is it possible to have the different lines in a sub-menu use different color schemes?

IE:

1st Submenu item (background is red, and text is white)
2nd Submenu item (background is blue, and text is white)
3rd Submenu item (background is green, and text is back)

The reason is, some of the items I am using the menu for have different color schemes, and I would like to use similar colors for that item (choice) in the sub menus.

Thanks a bunch,

Don


Poster: Shap5202
Dated: Tuesday November 1 2005 - 15:15:18 GMT

just set up different menu classes for each sub menu you want and assign that class to the menu.

Code:
with(milonic=new menuname("name1")){
         style=mainStyle;
        aI("showmenu=name2;");
}

with(milonic=new menuname("name2")){
         style=nextStyle;
aI("showmenu=name3;");
}

with(milonic=new menuname("name3")){
         style=thirdStyle;
}


something like that and just define the 3 different styles to have different colors


I'm sorry, i completely read your post wrong...
to actually answer your question, I believe you can definte different style at an item level.

in your aI() declaration, just change the style property you want there.


Poster: Ruth
Dated: Tuesday November 1 2005 - 15:47:09 GMT

Hi,

Shap is correct on the item declaration. Below my name you'll see links to style properties, menu properties and item properties. Many of the style properties which you declare in the style can also be declared in the item itself [check the item properties list] so you could declare offbgcolor=#ff0000;onbgcolor=x;offcolor=y;oncolor=w; and so on. That way you could do what you want, have each item a different offbgcolor, offcolor and onbgcolor, oncolor. You can even have different fonts, text decorations and so on.

Also, if you are trying to set up something where each submenu is the same, i.e. all submenus have 1st item red bg, 2nd item blue bg, 3rd item green bg and so on, you could simplify the process by creating css classes and calling the class using the offclass=myoffclass; onclass=myonclass; in the item.

Ruth