lock menu x position, but enable vertical follow scroll

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
alex130
Beginner
Beginner
Posts: 4
Joined: Fri Aug 06, 2004 5:11 pm

lock menu x position, but enable vertical follow scroll

Post by alex130 »

Hi, I'm having trouble to position my menu at the right side of the html page, so menu right edge will be attached to some static graphics.

I'm using the following code to declare main menu:

Code: Select all

  with(milonic=new menuname("Main Menu")){
    style=menuStyle;
    screenposition="top;right"
    alwaysvisible=1;
    left="offset=-20";
    top="offset=170";
    followscroll="100,5,100";
    orientation="vertical";
    aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
    aI("text=Menu Samples;showmenu=Samples;");
    aI("text=Milonic;showmenu=Milonic;");
    aI("text=Partners;showmenu=Partners;");
    aI("text=Links;showmenu=Links;");
    aI("text=My Milonic;showmenu=My Milonic;");
  }
Take a look at the following link:
http://www.angelfire.com/un/milonicmenu

The problem arises when user resizes the window. I want to achieve railing slide effect (and prevent page content overlap). Meaning, menu's right edge must always remain on the gray thick line.
If someone knows how to do that, please tell me.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Have you tried top and right position instead of screen position, it looks like it might be better in this case since you have the page set right.

maz
alex130
Beginner
Beginner
Posts: 4
Joined: Fri Aug 06, 2004 5:11 pm

Post by alex130 »

I've tried that but still there is a problem with left attribute.

Code: Select all

  with(milonic=new menuname("Main Menu")){
    style=menuStyle;
    //screenposition="top;right"
    alwaysvisible=1;
    left="680";
    top="170";
    followscroll="100,5,100";
    orientation="vertical";
    aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
    aI("text=Menu Samples;showmenu=Samples;");
    aI("text=Milonic;showmenu=Milonic;");
    aI("text=Partners;showmenu=Partners;");
    aI("text=Links;showmenu=Links;");
    aI("text=My Milonic;showmenu=My Milonic;");
  }
Now when the window is maximized the menu is on the center of the table (I have 1152x854 resolution) Image.,

but when window minimized to the width of the table or less, everything works ok

Image.

Maybe there is equivalent "right" attribute, that can be set...?
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Hmm, I don't remember offhand, if you can use right instead of left.

I was resisting telling you to put it in the table. ;)
But that would keep it where you want it with position=relative;

maz
alex130
Beginner
Beginner
Posts: 4
Joined: Fri Aug 06, 2004 5:11 pm

Post by alex130 »

The problem with relative position is that you cannot use follow scroll feature :(
alex130
Beginner
Beginner
Posts: 4
Joined: Fri Aug 06, 2004 5:11 pm

Post by alex130 »

Maybe it is possible to set left position of main menu to be left position of some anchor object, which is located where I want the menu to appear?
Post Reply