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:35

left offset and followscroll don't work correctly!


Poster: mirgia2
Dated: Saturday May 12 2007 - 16:50:13 BST

Hi people,
I've downloaded the milonic menu anb I'd like to know if possible to obtain that I'll explaing below.

I published my example in http://www.mg4web.it/casatasso/menu_sam ... /index.htm

I'd like to obtain a followscroll always with top distance about 100px and, above all, I'd like that, if the browser window is resized, my vertical menu has to remain always there. Try to resize the window to left (to obtain a smaller window)... the menu after some pixel will move to the left window border, without space!

How can I solve the problem?

Thanx
mirko


Poster: Ruth
Dated: Monday May 14 2007 - 6:43:01 BST

Hi,

Why exactly do you have your offset set to -390% are you setting your page at some 780% width or something? That doesn't make sense to me, wouldn't a page width be 100%, that is 100% of whatever the browser window would be, and then you've set screenposition at center, so wouldn't you do a minus left offset from that center position based on a 100% width of the page?

Where exactly do you want the left position of the menu to be?

As to the other issue, the followscroll and you want the menu to be at least 100px from the top, well, you can do that using an "x,y,z" setting on the followscroll, but note that since you have top set at 20px, then as the page loads the menu will start and 20px and look like it drops down to 100px since that is where you say you want the scroll to start.

Take a look at this post for an explanation of followscroll and how it can be used. Down in the middle of the post there is an orange underlined section with the explanation of this.

http://www.milonic.com/forum/viewtopic. ... 6027#16027

Also, get the pre-release version of 5.774 since there is a followscroll and left offset fix in it. http://www.milonic.com/menuvinfo.php

Hope this helps.

Ruth


Poster: mirgia2
Dated: Wednesday May 16 2007 - 21:03:34 BST

Thanx for you help... but the problem remains and I'm not an expert! :(
Try to open this link http://www.mg4web.it/casatasso/bozza2/milonic_test.htm and look that the followscroll is not correct from top page after the scroll ... then try to resize the window (click the right border to left)... I'd like to obtain a menu always there, as it is in the initial position with the maximum window size.
My main table is centered about the page so I tried to have a correct position with a distance from left offset=356%

I hope my is not so bad so you'll may understand how I want obtain!
Thank u very much for patince and collaboration.
mirko


Poster: Ruth
Dated: Friday May 18 2007 - 6:34:05 BST

Hi,

Well, it seems the followscroll parameters have changed. Set up your menu like this

Code:
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
screenposition="center";
top="offset=220";
left="offset=-364px";
orientation="vertical";
style=menuStyle;
//position="relative";
followscroll="0,3,5";


And on your page put this in the head section

Code:
<style type="text/css">
body{margin:10px}
</style>


The reason for the style code is that none of the browser have the same default margins, so if you do not set a margin the margins are different and the layouts are different in different browsers.

As to the menu file. I cannot get the followscroll="x,y,z" to work as it used to work. Originally, the x parameter was the number of pixels from the top position, however, now it seems that in order to do anything but set it right at the top of the browser window you have to use top="offset=220"; and then setting followscroll="0,3,5"; will have it scroll to 220 from the top of the browser window when you scroll. I cannot get it do do anything but that. Sorry.

Also, because your layout originally 954 px wide, plus the margins [10px now] this setup for the left="offset=264"; seems to work at resolutions higher than 1024x768. It will not work at less because your layout width is 954 plus margins, so the browser gets a scroll bar at the bottom, but the menu will be at the center of the screen resolution [width of browser window], NOT of your layout.

Ruth


Poster: mirgia2
Dated: Friday May 18 2007 - 8:42:37 BST

Hi Ruth,
thank you very much for your help!

Now the scroll is perfect but I was not able to block the movement to right when I resize the browser... probably it depends to my bad english :-)

Thanks a lot


Poster: Ruth
Dated: Friday May 18 2007 - 10:09:44 BST

Hi,

No you cannot do that if you resize the browser to be smaller than the layout size of 954px plus 10px left and 10px right margin, so thats 974. If you size it smaller than that, the menu is going to move over by the -offset numbers and that means it will move farther than that area.

It's because the menu centers based on the size of the browser window. So, with a window smaller the layout, when it subtracts the left="offset=-364"; then it is going to move farther to the left than that 'background area'. There is nothing you can do about that unless you eliminate the followscroll and instead use a relative positioned menu in that table cell which means it will always be in the correct place. But because it is relative positioned you cannot use followscroll, it will not work.

Ruth


Poster: mirgia2
Dated: Friday May 18 2007 - 11:02:13 BST

OK... it's all clear now!

Thanx you again for your patience and support!
mirko