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

Firefox Submenu Spacing (Image problem?)


Poster: s.telschow
Dated: Wednesday January 4 2006 - 13:13:33 GMT

Hi,
as you can see on http://wwf.zweipol.net there is a spacing (only firefox) on all menuitems which have a submenu image (arrow) next to it.
That spacing only appears the first time the submenu pops up, at the second time the spacing is correct. That also appears sometimes on items without images, too.

In IE Win it works, in Firefox Win/Mac there is a spacing in front and back of the menutext.

Any ideas?

Kind regards, Sebastian

subimagepadding ?


Poster: Migru
Dated: Wednesday January 4 2006 - 14:44:26 GMT

Hi

I cannot see what you described, but it might have something to do with
subimagepadding=5; set in your data.
Try to modify this and test it.

quote
    subimagepadding: Sets the Sub Menu Indicator Padding for any global menu style. This property will add white space to sub menu indicator images. The value for this property is in pixels.
    Example: subimagepadding=3;

unquote ( See http://www.milonic.com/styleproperties.php )

Michael


Poster: s.telschow
Dated: Thursday January 5 2006 - 14:20:13 GMT

Hey,
i attached an image to show you the problem:
Image

it has nothing todo with the padding-option, i tried that.
that is my style:

Code:
with(menuStyle=new mm_style()){
  bordercolor="#999999";
  borderstyle="solid";
  borderwidth="1";
  fontfamily="Arial, Verdana, Tahoma";
  fontsize="100%";
  fontstyle="normal";
  headerbgcolor="#ffffff";
  headercolor="#000000";
  offbgcolor="#fff2d8";
  offcolor="#5f5f5f";
  onbgcolor="#ffffff";
  oncolor="#000000";
  outfilter="randomdissolve(duration=0.0)";
  overfilter="Fade(duration=0.1);Shadow(color=#777777', Direction=135,   Strength=3)";
  padding="2";
  pagebgcolor="#fff2d8";
  pagecolor="#5f5f5f";
  separatorcolor="#999999";
  separatorsize="1";
  subimage="../img/milonic/arrow.gif";
  subimagepadding="5";
}


thank you, sebastian

item property


Poster: Migru
Dated: Thursday January 5 2006 - 20:04:36 GMT

Hi

try to correct this by introducing the "itemheight" property

Please see:

http://www.milonic.com/itemproperties.php

Quote:
Sets a specific Item Height for all menu items using the style.


Code:
Example: itemheight=18;


Michael


Poster: s.telschow
Dated: Friday January 6 2006 - 10:03:03 GMT

hey,
the imagehigh thing worked, thanks ... but just for the height of the items ;-)
as you can see in my second example, the itemwidth is also not correct in firefox. ok, i tried also itemwidth, but the textlength differs... so i removed itemwidth.

any ideas about that, too?
sebastian

itemheight and itemwidth


Poster: Migru
Dated: Friday January 6 2006 - 11:27:23 GMT

Hi

My idea on that is, it should work with itemwidth too, but on an individual
basis of each item or the menu: Samples:

Your code
Quote:
aI("image=img/navi/flag.gif;text=Großer Panda  url=detail.php?id=8;");
e.g. I would try to modify into
Code:
aI("image=img/navi/flag.gif;text=Großer Panda;itemwidth=97;align=left;url=detail.php?id=8;");

Please see
http://www.milonic.com/itemproperties.php

Infact, I think, when itemwidth resizes horizontally all your letters and spaces, it might not be useful to apply   if you want it left aligned and if left alignment is too close to the left margin, I suggest therefore to introduce a small transparent gif in front of the text, with the same dimensions as your naviflag.gif e.g. has. I also do not know really, if itemwidth just fills the rest of the space with styled details or if it is doing some sort of balancing too.

Therefore , in these cases

Code:
with(milonic=new menuname............
itemwidth=97;
style=menuStyle;
alignment="left";
aI("text=<img src=navi/trans.gif border =0> Bären;showmenu=b_5;");


should do the job, where "trans.gif" is the transparent gif. When you are calling the menu from different directories, then this gif should have a full path. e.g http://wwf.zweipol.net/navi/trans.gif or, when called only from your root, then navi/trans.gif will do it. etc. (as you do already)

It is always recommended to study the "styling sections" and the basics
in

http://www.milonic.com/forum/viewforum.php?f=14
By the way, IE and FF will never display everything in the same way. So "enforcement" is needed, you will not get this with &nbsp; I think, it is advisable to make use of menu- and item-properties set as many as necessary.

Michael


Poster: s.telschow
Dated: Friday January 6 2006 - 11:42:47 GMT

Hello again,
ok, the itemwidth thing will work - that is correct.
but the menu is built dynamically through a cms, and the font is not monospaced, so i am not able to calculate the itemwidth for each single item.
thats why i can´t use the itemwidth setting.

the thing with the transparent image has been also tested by me before the &nbsp workaround.
&nbsp does it for me now, the spacing still only appears if the item has a submenu under it. (and the litte black arrow in it)
so my idea was to preload the litte submenu arrows, but that was not the problem.

thanks a lot for your help michael!

itemwidth


Poster: Migru
Dated: Friday January 6 2006 - 11:49:18 GMT

Hi

Don´t you think you can set the itemwidth as part of the menu-definitions?

Code:
with(milonic=new menuname............
itemwidth=97;
style=menuStyle;
alignment="left";

.....?????????

Michael