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

Using images in menu?


Poster: rudy
Dated: Thursday July 15 2004 - 23:37:08 BST

Using version 5.33

http://www.networkdriven.com/qp/579bb62.html

I am using the
Code:
subimage="/qp/arrow.gif";
in the style sectioin of the code, which puts a black right arrow in the main menu items at the very top of the menu and also the same black right arrow image in all submenu dropdowns. This all works fine, but what I would like to have is the top menu items with a different image than those in th submenu images as the black right arrow image. All the images must be right side of the text.

I tried to find a sample menu like the Milonic home page menu to see the code, as it has what I am looking to do, but couldn't find a sample like that. Any help would be appreciated.


Poster: Maz
Dated: Friday July 16 2004 - 2:59:07 BST

Creat a new style for the submenu and place the style= with the new style name. Then add the new image url.

subimagealign="right"; places the image to the right.

Double check the style name, sometimes I have to look it up again.

maz


Poster: rudy
Dated: Friday July 16 2004 - 15:00:53 BST

I'm sorry Maz, but I didn't grasp your reply, could you rough this out for me - sample


Maz wrote:
Creat a new style for the submenu and place the style= with the new style name. Then add the new image url.

subimagealign="right"; places the image to the right.

Double check the style name, sometimes I have to look it up again.

maz


Poster: Ruth
Dated: Friday July 16 2004 - 16:44:14 BST

Since it seems all you are changing is the subimage, then you could do this
Code:
windows98style1 =new copyOf(windows98style)
windows98style1.subimage="../qp/arrow.gif";
That would apply everything that is in the original style to the submenus including the subimage which you have listed, then in the original windows98style change that subimage to what you want it to be. Remember to go through and assign the windows98style1 to all the submenus. Here's some information about styles and creating more than one style [partII of the post] and using shortcut copyof method [partIII] of the post.

Ruth


Poster: rudy
Dated: Friday July 16 2004 - 17:50:15 BST

I tried this Ruth but I don't think I wrote the code right - it didn't work.

Code:
with(windows98style1=new copyOfwindows98style()){
withwindows98style1=subimage="..qp/arrow.gif";

with(windows98style=new mm_style()){
//with(windows98style1=subimage="..qp/arrow.gif";
onbgcolor="#000000";
oncolor="#FFFFFF";
offbgcolor="#FFAD73";
offcolor="#000000";
bordercolor="#BFBFBF";
borderstyle="raised";
borderwidth=2;
subimage="../qp/arrow.gif";
subimagepadding="2";
overfilter="Fade (duration=0.2);Alpha (opacity=90);Shadow(color=#777777', Direction=135, Strength=5)";
outfilter="randomdissolve(duration=0.3)";
separatorsize="2";
padding=4;
fontsize="75%";
fontfamily="tahoma, verdana";
headercolor="#FFAD73";
headerbgcolor="#000000";
high3dcolor="#eeeeee";
low3dcolor="#7F7F7F";
swap3d="1";
}



Ruth wrote:
Since it seems all you are changing is the subimage, then you could do this
Code:
windows98style1 =new copyOf(windows98style)
windows98style1.subimage="../qp/arrow.gif";
That would apply everything that is in the original style to the submenus including the subimage which you have listed, then in the original windows98style change that subimage to what you want it to be. Remember to go through and assign the windows98style1 to all the submenus. Here's some information about styles and creating more than one style [partII of the post] and using shortcut copyof method [partIII] of the post.

Ruth
[/code]


Poster: John
Dated: Friday July 16 2004 - 17:54:00 BST

The new code needs to go after the complete original definition (with(windows98style=new mm_style()){, etc.). Otherwise it has nothing from which to copy.


Poster: Ruth
Dated: Friday July 16 2004 - 18:41:50 BST

Also, you didn't change the subimage so it will still be the same. The link to the Beginner's guide styles posts I gave would show the copyof would come after the original style.

Ruth


Poster: rudy
Dated: Friday July 16 2004 - 19:14:02 BST

OK - I have a typical man mentality- only read the directions if all else fails.

Ruth, I read tye "style" link and followed the (well written) directions and low and behold, it works.

Take a look, please - let me know what you think:
http://www.networkdriven.com/qp/579bb62.html

Thanks, Ruth, John and Maz