- Create Account

locking the Supernote position relative to a nav button

Forums > SuperNote > locking the Supernote position relative to a nav button
Author
Message

1) JDog Group: Guests
IP: 75.177.--.--
Looking for a script that will show a hidden layer (300px high) right above a navigation button (40px high) on Mouseover. Button link is down the page about 500px. This Supernote is a very elegant solution, but I can't figure out how to get that note to lock in place independent of the browser window size. The layer moves around depending on weather I resize the window or scroll down, etc. It only positions over the button when the browser window is sufficiently long enough to accomodate about twice the height of the hidden layer -- at about 800px tall. Shorter than that and my layer starts moving north with it. Probably something simple but I've tweaked the hell out of it and can't win.

2) Angus Turnbull Group: Moderators
Posts: 4042 Joined: 7 Dec 2003 Location: New Zealand IP: 203.173.--.--
The script does have a relative position example in its demonstration (The "Relative Note" that "always appears relative to its trigger").

That should do exactly what you want? The script will reposition if the note can't be contained in the window, but that's a feature!

Otherwise, if you just want to show a layer at a point in the page, rolling your own solution could be a lot simpler:

document.getElementById('id-of-element').style.visibility = 'visible';

where the element is absolutely positioned in the right place and visibility:hidden.

- Angus.

Post a Reply:

You are not logged in, and will be posting anonymously as a guest. If you want to post using an account, please login at the top of this page.