Fixed element on screen

Discussion in 'JavaScript' started by steinramm, Jun 2, 2009.

  1. #1
    The element is in the middle of the screen. How to make it stick on the top of the page when you scroll page down. I know there is something similar, but I don't have an idea how to find it. Help is much appreciated! Thanks!
     
    steinramm, Jun 2, 2009 IP
  2. xlcho

    xlcho Guest

    Messages:
    532
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is a CSS attribute "position: fixed", but it doesn't work on IE. So, this can be done with "position: absolute" and calculation of the scroll offset.
     
    xlcho, Jun 2, 2009 IP
  3. Unni krishnan

    Unni krishnan Peon

    Messages:
    237
    Likes Received:
    9
    Best Answers:
    2
    Trophy Points:
    0
    #3
    Hope this helps

    "http://www.hotscripts.com/forums/javascript/52088-make-element-follow-page-scroll-how.html"
     
    Unni krishnan, Jun 3, 2009 IP