followscroll to stay 1 px from the top with screenposition o
followscroll to stay 1 px from the top with screenposition o
How do i get followscroll to stay 1 px from the top when scrolling, and at the same time using the screenposition feature?
with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top="offset=75";
center="offset=-20";
alwaysvisible=1;
orientation="horizontal";
followscroll="1";
aI("text=Home;url=http://www.milonic.co.uk/;itemwidth=100;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;");
The followscroll stays 75px down the screen all the time.
Any suggestions anyone?
Regards
4viggo
with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top="offset=75";
center="offset=-20";
alwaysvisible=1;
orientation="horizontal";
followscroll="1";
aI("text=Home;url=http://www.milonic.co.uk/;itemwidth=100;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;");
The followscroll stays 75px down the screen all the time.
Any suggestions anyone?
Regards
4viggo
Followscroll can take up to three parameters...see these for examples.
viewtopic.php?t=2064
viewtopic.php?t=2314
viewtopic.php?t=2064
viewtopic.php?t=2314
Dave Hergert
Software Engineer
"Helping to make the menu better, one at a time."
Software Engineer
"Helping to make the menu better, one at a time."
Tried it with the 2 extra parameters, but the main menu is still adjusting it self 75px down the screen when you are scrolling.
code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top="offset=75";
center="offset=-20";
alwaysvisible=1;
orientation="horizontal";
followscroll="1,100,2";
aI("text=Home;url=http://www.milonic.co.uk/;itemwidth=60;status=Back To Home Page;");
aI("text=Menu Samples;itemwidth=120;showmenu=Samples;");
Whitout the screenposition it works fine
Any thoughts to why the screenposition is screwing up the followscroll?
regards
4viggo
code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
screenposition="center";
top="offset=75";
center="offset=-20";
alwaysvisible=1;
orientation="horizontal";
followscroll="1,100,2";
aI("text=Home;url=http://www.milonic.co.uk/;itemwidth=60;status=Back To Home Page;");
aI("text=Menu Samples;itemwidth=120;showmenu=Samples;");
Whitout the screenposition it works fine
Any thoughts to why the screenposition is screwing up the followscroll?
regards
4viggo
Oh I see the problem now.
You've got the menus screenposition set to "center", that's fine.
You've also got an offset of -20 for left position, that's fine too.
But, you've got an offset for the top position, not fine.
The problem is, an offset is always relative to something else and in this instance the top offset isn't relative to anything because nothing has been specified for the top position - This is where it can get complicated.
Anyway, to cut this story short. If you change the top position from an offset to an actual position it will work. I'd suggest changing top="offset=75"; to top=75;
Hope this helps
Andy
You've got the menus screenposition set to "center", that's fine.
You've also got an offset of -20 for left position, that's fine too.
But, you've got an offset for the top position, not fine.
The problem is, an offset is always relative to something else and in this instance the top offset isn't relative to anything because nothing has been specified for the top position - This is where it can get complicated.
Anyway, to cut this story short. If you change the top position from an offset to an actual position it will work. I'd suggest changing top="offset=75"; to top=75;
Hope this helps
Andy
Thanks Andy
The absolute position and RC12 fixed it. Great work
The only snag left is, it's not possible to specify the amount the menu should stay from the top when you scroll. It stays at 1 px no matter what you set the followscoll parameter at.
That's no big problem for me just thought i should let you know.
Thanks again for all the help.
regards
4viggo
The absolute position and RC12 fixed it. Great work
The only snag left is, it's not possible to specify the amount the menu should stay from the top when you scroll. It stays at 1 px no matter what you set the followscoll parameter at.
That's no big problem for me just thought i should let you know.
Thanks again for all the help.
regards
4viggo