Hi,
I have a 3 level menu. The 1st level is always visible (the main menu), the second and third both "pop up" when "moused over". I have used the _suboffsetlleft so that I can position the second submenu in the right place (25px to the right).
The problem is then that the 3rd submenu is also offset by the _suboffsetleft value. Is there anyway to make it that only the second submenu uses the _suboffsetleft value?
Thanks
submenu positioning
Set _subOffsetLeft=0; and instead, apply a horizontal offset to each second-level menu individually using the left property in the menu definition, like so:
Since the offset values is defined in a string, you could also use a global string variable, in case you want to tweak it without having to edit every menu definition each time. Like so:
Now, if you wanted to change the second-level offset to, say, 30 you would just edit the value assigned to leftSubOffset; e.g.,
Hope that helps,
Kevin
Code: Select all
with(milonic=new menuname("Products")){
style=subStyle;
left="offset=25";
...
aI("...");
}
Code: Select all
// Globals
_SubOffsetLeft = 0;
...
leftSubOffset = "offset=25";
...
// Menu defs
with(milonic=new menuname("Products")){
style=subStyle;
left=leftSubOffset;
...
aI("...");
Code: Select all
leftSubOffset="offset=30";
Kevin
Hi Kevin,
Thanks for the answer. Unfortunately I don't seem to be able to get it to work.
These are my two styles (the rawcss in the 1st one is to get the padding to the right but I can't have an image now other wise the image is padded to the end and therefore does not sit where I want it)
with(HeadersStyle=new mm_style()){
offbgcolor = "transparent"
onbgcolor="#FFFFFF"
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);Alpha(opacity=80);)";
padding=1;
imagepadding=0;
pagebgcolor="#FFFFFF";
pagecolor="black";
separatorsize=0;
subimagepadding=1;
if(ie){
rawcss="padding-right:12px;";
}
else{
rawcss="padding-left:10px;padding-right:35px;";
}
}
with(SubMenuStyle=new mm_style()){
left="offset=25";
offbgcolor = "#FFFFFF"
onbgcolor="#EC9B13"
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);)";
padding=1;
pagebgcolor="#EC9B13";
pagecolor="black";
separatorsize=0;
subimage="/images/arrow.gif";
rawcss="padding-right:5px;";
}
Thanks for the answer. Unfortunately I don't seem to be able to get it to work.
These are my two styles (the rawcss in the 1st one is to get the padding to the right but I can't have an image now other wise the image is padded to the end and therefore does not sit where I want it)
with(HeadersStyle=new mm_style()){
offbgcolor = "transparent"
onbgcolor="#FFFFFF"
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);Alpha(opacity=80);)";
padding=1;
imagepadding=0;
pagebgcolor="#FFFFFF";
pagecolor="black";
separatorsize=0;
subimagepadding=1;
if(ie){
rawcss="padding-right:12px;";
}
else{
rawcss="padding-left:10px;padding-right:35px;";
}
}
with(SubMenuStyle=new mm_style()){
left="offset=25";
offbgcolor = "#FFFFFF"
onbgcolor="#EC9B13"
outfilter="randomdissolve(duration=0.5)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);)";
padding=1;
pagebgcolor="#EC9B13";
pagecolor="black";
separatorsize=0;
subimage="/images/arrow.gif";
rawcss="padding-right:5px;";
}
Hi,
You've put left="offset=25"; in a menu style definition. It's a menu property, rather than a style property. You have to use it in the menu definition, rather than a menu style definition (e.g., as in the "Products" menu in the example I posted earlier). That may do the trick.
Hope that helps,
Kevin
You've put left="offset=25"; in a menu style definition. It's a menu property, rather than a style property. You have to use it in the menu definition, rather than a menu style definition (e.g., as in the "Products" menu in the example I posted earlier). That may do the trick.
Hope that helps,
Kevin