Jump to content
  • Advertisement
Sign in to follow this  
Lenggo

[web] Scroll bar position

This topic is 3823 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was just wondering if anyone knows how to change the initial starting position of a scroll bar. I have a layer that contains some dynamic data and I dont want it starting right at the top, but I'm not sure about how to reposition it. I was thinking that I need to use javascript but I'm not sure. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I believe you can put an anchor in the page and then link to the anchor. This should accomplish what you're asking for. Reference this page: http://www.w3schools.com/html/html_links.asp

Share this post


Link to post
Share on other sites
With javascript, you can use the scrollHeight property to find the maximum scroll amount and scrollTop to set the scroll position.

Share this post


Link to post
Share on other sites
Thanks alot guys.
I ended up using the scrolltop property to get it done and works really well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!