1

I have a page that has a link. When the user pressed the link he goes to a page which has a lot of text. I want the scrolled always be at the bottom of the screen. How can I do that ?

Please let me know if something is not clear.

Thanks for any help.

user8202693
  • 159
  • 1
  • 3
  • 13

2 Answers2

4

You can make the link refer to a fragment in the document, rather than the whole document. The browser will automatically scroll there.

You'd have something like this:

document-1.html:

<div id="some-content">Foo</div>
<div id="other-content">Bar</div>

index.html:

<a href="document-1.html#some-content">Link to some content</a>
<a href="document-1.html#other-content">Link to other content</a>
Horia Coman
  • 8,681
  • 2
  • 23
  • 25
0

You can use anchor links, for this, you should have a link like href="/nextpage.html#anchor"

And add <div id="anchor"></div> to you destination page, in a part which should scrolled up