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

Image wrapping - vertical image/item height?


Poster: ssalter
Dated: Saturday June 26 2004 - 20:44:52 BST

I never did get the dropshadow working that I posted about yesterday. Giving a plain white or black background, changing shadow colors, did not make a difference. However, that is trivial, I don't necessarily want to rely on the IE filters for effects.

I am playing with item images for the top level menu items. My style definition for the top level menus is:

Code:
with(mainmenu=new mm_style()){
borderwidth=0;
onbgcolor="transparent";
oncolor="#ff0000";
offbgcolor="transparent";
offcolor="#000000";
padding=5;
fontsize="120%";
fontfamily="Verdana, Tahoma, Arial";
itemwidth=142;
imagewidth=142;
itemheight=23;
imageheight=23;
align="center";
}


I define the top level menu like this:

Code:
with(milonic=new menuname("Main Menu")){
style=mainmenu;
position="relative";
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;bgimage=off1.gif;overbgimage=over1.gif;");
aI("text=WebTools;showmenu=webtools;bgimage=off1.gif;overbgimage=over1.gif;");
aI("text=Departments;showmenu=departments;bgimage=off1.gif;overbgimage=over1.gif;");
aI("text=Resources;showmenu=resources;bgimage=off1.gif;overbgimage=over1.gif;");
}


Here are the off/over images:

Image
Image
What I get is this:

Image

The thin white line below each menu item is the top of a duplicate of each "off" image. I verified that by increasing the itemheight property to 50 which is over twice that of the image (142x23) and seeing a duplicate of the blank image below. So, it DOES appear to be wrapping. I am not sure what I am doing wrong since I specified both item and image dimensions.


Poster: ssalter
Dated: Saturday June 26 2004 - 21:55:59 BST

Nevermind, figured it out. I had a padding property of 5 which caused the malfunction. Actually, not a malfunction, the script did what I was telling it to do. I changed padding in the menu style to 2 and it looks most excellent now.


Poster: John
Dated: Sunday June 27 2004 - 22:33:47 BST

Glad to hear you figured it out on your own. Good feeling, yes? :D


Poster: ssalter
Dated: Monday June 28 2004 - 13:31:13 BST

John wrote:
Glad to hear you figured it out on your own. Good feeling, yes? :D


Yes, sure is. I probably should have kept trying before posting but I was at wit's end...or close to it. What a great menu, how long has it been around and how come I never encountered it before? :)