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

Mixing bgimage and onbgcolor/offbgcolor


Poster: rbinse
Dated: Thursday July 22 2004 - 15:31:19 BST

I've a little problem : I use a transparent image to make round corner on main menu item. I specify a onbgcolor and a offbgcolor. The problem is that the offbgcolor never comes back after selecting the main item.

Do I something wrong ?

http://coaching.cadresonline.com/colmilonic/menu.htm

Here is my code :

Code:
with(menuStyle=new mm_style()){
onbgcolor="#AC0C01";
oncolor="white";
offbgcolor="white";
offcolor="#515151";
separatorcolor="#000000";
separatorsize="2";
fontsize="11px";
fontstyle="normal";
fontfamily="Arial";
align="center";
bgimage="bgd_onglet_118.gif";
itemheight="18px";
itemwidth="118px";
}


Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
left=10;
alwaysvisible=1;
orientation="horizontal";
aI("text=ACCUEIL;bgimage=bgd_onglet_73.gif;itemheight=18px;itemwidth=73px;url=http://www.cadresonline.com/;status=CadresOnline;");
aI("text=LES OFFRES;showmenu=Offres;");
aI("text=L'ACTUALITE;showmenu=Actualite;");
aI("text=LE COACHING;showmenu=coaching;");
aI("text=CREER MON COMPTE;showmenu=creercompte;onbgcolor=#C3CB63;");
aI("text=ESPACE RECRUTEUR;showmenu=recruteur;");
}


Poster: rbinse
Dated: Friday July 23 2004 - 14:26:09 BST

no idea ???


Poster: Maz
Dated: Friday July 23 2004 - 16:33:48 BST

Is think you need an overbgimage with the rounded corners to switch the background.

maz


Poster: Ruth
Dated: Friday July 23 2004 - 19:13:40 BST

Yes, Maz is correct you need an overbgimage. But that still won't solve the problem, I tried it. The solution I found was to make the bgimage and overbgimage non transparent. That would mean you need two bgimages one 118px and one 73px, and three overbgimages, two 118px and one 73px. The third one you'd make green for the item you want to be green in mouseover.

One thing to remember, bgimages repeat. You have itemwidth and height set and if text size is increased in Netscape it won't make the items wider but it will make them higher and that forces the background image to repeat. You can avoid that by making the image about 100px high. The file size remains the same 1px. Hope that helps. If you need the images, I have them since I made them to test things.

Ruth