By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,689 Members | 1,915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,689 IT Pros & Developers. It's quick & easy.

Manually setting the position of a scrollbar

P: 32
Hey, I've got an HTML page with several span tags, each of which will gain text as my script runs. I've got them fixed in a box, and overflow set to "auto" so that they'll have a scrollbar when the text can no longer fit.

\I want the scroll bar to move down as far as it can go each time text is added, so that it "follows" the text. My problem is that I'm not sure how to do this. Is there some easy way with Javascript to set the position of the scrollbar?
Jun 25 '09 #1

✓ answered by acoder

Yes, use scrollTop.

Share this Question
Share on Google+
2 Replies

Expert Mod 15k+
P: 16,027
Yes, use scrollTop.
Jun 26 '09 #2

P: 32
Awesome, it works great now. Thanks.
Jun 26 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.