Results 1 to 3 of 3

Thread: Drop in Box Top Position Help

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

    Smile Drop in Box Top Position Help

    1) Script Title: Drop In Box

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici.../dropinbox.htm

    3) Describe problem: How can I make this box drop in closer to the top of the page/screen? If I change the <div> line in the body of the page, it still will not cause it to land any higher than about 2" from the top of the screen:

    <div id="dropin" style="position:absolute;visibility:hidden;left:430px;top:0px;width:300px;height:150px">

    Can someone pls tell me how to change this properly?

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    hi vlane, I was trying some different things and it seems that changing the number highligted in red makes it appear closer to the top. I changed it from 100 to 10.
    Code:
    function dropin(){
    scroll_top=(ie)? truebody().scrollTop : window.pageYOffset
    if (parseInt(crossobj.top)<10+scroll_top)
    crossobj.top=parseInt(crossobj.top)+40+calunits
    else{
    clearInterval(dropstart)
    bouncestart=setInterval("bouncein()",50)
    }
    }
    I don't really understand the code, but changing that number may get you what you want

  3. #3
    Join Date
    Dec 2005
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yeah that worked great. Thanks for pointing that out. I was going crazy with messing with the dropdiv value.

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
  •