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:55
Opacity of the sub menu and the color of the text
Poster: ChazMonro
Dated: Thursday September 14 2006 - 17:22:19 BST
I did some research and found that I could give the offclass and onclass a style that would make the background of the submenu a opacity value that would give it a cool semi-transparent effect. However it also applies the opacity style to the text color, is there a way to target only the background and not the text?
Thanks,
Chuck
Poster: Ruth
Dated: Thursday September 14 2006 - 19:34:59 BST
Hi Chuck,
Could you give me the code you had for applying the opacity. I don't do much css but I'm pretty good at workarounds so if I had your starting code I could experiment.
Ruth
Poster: ChazMonro
Dated: Friday September 15 2006 - 15:53:10 BST
this is the code for the subMenu Style.
Quote:
with(subMenuStyle=new mm_style()){
onbgcolor="#525651";
oncolor="";
offbgcolor="#373a36";
offcolor="";
bordercolor="";
borderstyle="solid";
borderwidth=0;
separatorcolor="#373a36";
separatorsize="0";
padding=3;
fontsize="10px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#FFFFFF";
pagebgcolor="";
headercolor="";
headerbgcolor="";
subimage="";
subimagepadding="3";
overfilter="Fade(duration=0.0);Alpha(opacity=80);Shadow(color='#666666', Direction=135, Strength=0)";
outfilter="randomdissolve(duration=0.0)";
offclass="opaque";
onclass="opaque";
}
onbgcolor="#525651";
oncolor="";
offbgcolor="#373a36";
offcolor="";
bordercolor="";
borderstyle="solid";
borderwidth=0;
separatorcolor="#373a36";
separatorsize="0";
padding=3;
fontsize="10px";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="#FFFFFF";
pagebgcolor="";
headercolor="";
headerbgcolor="";
subimage="";
subimagepadding="3";
overfilter="Fade(duration=0.0);Alpha(opacity=80);Shadow(color='#666666', Direction=135, Strength=0)";
outfilter="randomdissolve(duration=0.0)";
offclass="opaque";
onclass="opaque";
}
ok and then this is the css
Quote:
.opaque {
color:#FFFFFF;
opacity:.9;
-moz-opacity: .9;
filter:alpha(opacity=90);
}
color:#FFFFFF;
opacity:.9;
-moz-opacity: .9;
filter:alpha(opacity=90);
}
Thanks,
Chuck
Poster: Ruth
Dated: Saturday September 16 2006 - 19:22:59 BST
Hi Chuck,
OK, I thought that might be what you were using and unfortunately there's no way to apply that to 'part' of the menu. Such codes would apply to a whole item - I think they call it an object.
There are two things you could do, first and easiest would be to create a bgimage the way you want that transparency to look, the second and more time consuming would be to create images for every item with the text on the image and then make the background transparent and then keep your css code. That code would not apply to the images so it wouldn't make the text opaque.
Sorry
Ruth