Results 1 to 2 of 2

Thread: Repositioning Sticky Note

  1. #1
    Join Date
    Oct 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Repositioning Sticky Note

    Hi there

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

    I am trying to move down about 100 pixels the appearing sticky note.

    I have played around with 'top: -400px;' but no changes take place.

    Any clues?

    Any help appreciated. Thank you.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That only positions the sticky out of the viewable area of the page prior to its appearance on the scene. It is the code the calculates its actual position when it appears. The final calculation for vertical positioning is done on this line:
    Code:
    objref.style.top=scroll_top+docheight/2-objheight/2+"px"
    To add 100 pixels to it, do like so:
    Code:
    objref.style.top=100+scroll_top+docheight/2-objheight/2+"px"
    The line appears twice in the code, once to position the sticky and a second time to update its position if the static option is used. For best results, change both lines identically.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •