Click to See Complete Forum and Search --> : I need help positioning this script.


Gitman
10-04-2005, 06:46 AM
I can't get this thing to move:

http://www.dynamicdrive.com/dynamicindex17/stickynote.htm

I am adjusting the "top" setting in the css, is this not where I would adjust the vertical positioning? I need to make it appear further down the page. How do I do this?

Thanks.

d4p41n
10-04-2005, 06:57 AM
Hi Gitman!

Your link is not working...

can you fix that,please.

best regards,
d4p41n

Gitman
10-04-2005, 07:36 AM
Hey,

Thanks for noticing that. It's weird, because I went and tried to edit it, but it still doesn't work when you click on it. You have to rightclick, copy shortcut, and then paste it into the URL bar.

Try that. :)

d4p41n
10-04-2005, 08:02 AM
Hi Gitman!

If i understand u right you want the appearant box to be a litte nearer to the bottom.

i looked at your code and found 2 function responsible for the positioning:
- function staticfadebox line 96
- function displayfadeinbox line 53

if you change the line which started with: "objref.style.top=", by adding a number the box will be a litte farer from the top.

for example:

current:
objref.style.top=scroll_top+docheight/2-objheight/2+"px"

20px more to the bottom:
objref.style.top=20+scroll_top+docheight/2-objheight/2+"px"

dont forget to change it in both functions...

best regards,
d4p41n

Gitman
10-04-2005, 11:36 AM
Hi d4p41n!

Thanks so much for helping. Wow, you must be a genius! That worked perfectly. I would have never figured that out by myself.

I just have one more question. I noticed that if someone scrolls before the lil' window fades in, then the box will appear down the page (I guess it just appears a certain px from the top of the browser, no matter how far down someone has scrolled) What I need, if possible, is for this box to only fade in or appear in a certain place, otherwise, it looks out of place, and doesn't make any sense. Is this possible?

Thanks.