SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scroll HTML elements with overflow:auto

    Hi all,

    I know it's possible to set the scrolling position of the entire HTML document, but is it also possible to change the scrolling position in an HTML element with overflow set to auto? (or "scroll" of course)

    The reason I ask is because I'm building a chat-app and everytime someone adds a message to the screen, you have to scroll down to see it, because the scrolling position does not change.

    Thanks in advance!

  2. #2
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I solved it by setting location.hash to the id of the last submitted message. Although this works fine, I'm still curious to the answer to my question

  3. #3
    SitePoint Zealot sajjad's Avatar
    Join Date
    May 2005
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good


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
  •