PDA

View Full Version : Omnislide menu positioning



wanapitei
01-29-2008, 08:02 PM
I'm using Omnislide (http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm) as my navbar. I'd like to have the menu stay put at the absolute top of the window and scroll out of view as the user proceeds down a lengthy page. A quick look by scrolling to the bottom of my Bibliography (http://www.morleychalmers.com/MostlyTheravada/thePortal/bibliography.html) page will show you what I don't want.

My reading of the Properties file suggests that this is the function that controls menu float behaviour.


kviewtype:'absolute', // The method used to keep menu visible when page is scrolled - 'fixed' or 'absolute'. Fixed will not appear to move at all, staying completely stationary in relation to the window's frame, while 'absolute' will follow scrolling in a fluid motion: defaults to 'absolute' (floating) unless menu is top menu. 'fixed' is overridden in browsers that do not support it. For a menu that appears in the normal flow of the page, use 'absolute' here and false for keepinview (see previous).

However, not so. With both values, the effect is identical. Tested on both Safari and FireFox, the dominant browers on the Mac platform. Don't know yet how it behaves on a PC.

Have I misunderstood how to get the effect I want?

Kind regards,

jscheuer1
01-29-2008, 11:45 PM
You have a section of the script commented out, but where you have the code uncommented, you have:


keepinview:80, // Use false (for not static) - OR - true or numeric top offset when page scrolls
kviewtype:'fixed', // menu at the top of the window, 'fixed' floats as the window is scrolled

and then later:


kviewtype:'fixed', // Type of keepinview - 'fixed' utilizes fixed positioning where available, 'absolute' fluidly follows page scroll


kviewtype should only be set once. Now, I think I assumed that the top menu would always follow the content, because when I set yours as:


keepinview:false, // Use false (for not static) - OR - true or numeric top offset when page scrolls
kviewtype:'absolute', // menu at the top of the window, 'fixed' floats as the window is scrolled


It only remains at the top of the window, not the top of the page. In IE 6, which cannot do fixed position it works, but all others still stay at the top of the window, not the page.

Do this - first make sure you have only one each of keepinview and kviewtype.

Set:


keepinview:false,
kviewtype:'absolute!important',

That will work cross browser.

wanapitei
01-30-2008, 04:42 PM
That works! First time through, didn't see the "kviewtype" setting already in place and supplied another one.

Much thanks.