Firefox Submenu Spacing (Image problem?)

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
s.telschow
Beginner
Beginner
Posts: 4
Joined: Wed Jan 04, 2006 1:44 pm

Firefox Submenu Spacing (Image problem?)

Post by s.telschow »

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
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

subimagepadding ?

Post by Migru »

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://milonic.com/styleproperties.php )

Michael
s.telschow
Beginner
Beginner
Posts: 4
Joined: Wed Jan 04, 2006 1:44 pm

Post by s.telschow »

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: Select all

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
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

item property

Post by Migru »

Hi

try to correct this by introducing the "itemheight" property

Please see:

http://milonic.com/itemproperties.php
Sets a specific Item Height for all menu items using the style.

Code: Select all

Example: itemheight=18;
Michael
s.telschow
Beginner
Beginner
Posts: 4
Joined: Wed Jan 04, 2006 1:44 pm

Post by s.telschow »

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
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

itemheight and itemwidth

Post by Migru »

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
aI("image=img/navi/flag.gif;text=Großer Panda  url=detail.php?id=8;");
e.g. I would try to modify into

Code: Select all

aI("image=img/navi/flag.gif;text=Großer Panda;itemwidth=97;align=left;url=detail.php?id=8;");
Please see
http://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: Select all

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://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
s.telschow
Beginner
Beginner
Posts: 4
Joined: Wed Jan 04, 2006 1:44 pm

Post by s.telschow »

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!
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

itemwidth

Post by Migru »

Hi

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

Code: Select all

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

.....?????????
Michael
Post Reply