- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Other’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi, I’m curious about linking to the middle of a page. Normally when you link within the page you’re on, it takes you to your anchor with the name or id that you specified but it puts that particular section at the top of your browser window. Here’s an example –> http://en.wikipedia.org/wiki/David_bowie. When you click on "1947–67: Early years" in the contents box, it takes you to that part of the page, but it puts "1947–67: Early years" at the very top of the page.
I don’t want that. I want to skip to a particular section but have that section appear in the middle of the page… or even better, at a particular distance from the top of the browser window.
Any help would be greatly appreciated.
Thanks,
Ryan
just put the anchor above the section that you want. If you want a particular section to be in the middle of the page, then put that section in the middle and then put the anchor at the top of the page. Problem solved, no javascript needed
I’m going to <a href="#middle">link</a> to an item in the middle of the page!
….
….
<a name="middle"></a>This is the middle of the page!
….
….