PDA

View Full Version : web page to open half way down page


richcodesign
01-22-2010, 05:14 PM
Hello,

I have been asked by my company to see if i can have a page open at a certain point (almost half way down the page).

http://www.richcoltd.co.uk/antislip_surface_dressing.htm

For example: when you click on the "next system" button it opens the next page at the same point as the last page was viewed (or a certain distance down).

The issue is when the site is viewed on a laptop, the page obviously opens/views from the top and the information is cut off, and you need to scroll down. I dont see that this is an issue, however i have been asked to look at a way this can be done if possible.

domedia
01-22-2010, 05:29 PM
Make sure there's an ID attribute somewhere on the next page where you want the page to go to.
For example:
<h2 id="certainPoint">

Then just make a link like:
<a href="nextPage.html#certainPoint">Next Page</a>

This has nothing to do with a laptop though..The webpage has no way of knowing if it's viewed on a laptop or a desktop.
.

DWcourse
01-22-2010, 05:39 PM
DOH!

You know, sometimes you just feel stupid. I've been inserting empty anchor tags to link to certain points on pages and it never occurred to me that you could link to ids in any tag not just ids in the anchor tag!:roll:

Just goes to show you that it's never too late to learn the basics.

edbr
01-23-2010, 01:00 AM
i know me 2!! second time this week for me . I love it

richcodesign
01-25-2010, 08:11 AM
Thanks for the feedback.

Just what i was wanting. I too did not think that could be done.

Cheers

rattlsnak
01-25-2010, 08:31 PM
count me in as well. goodbye anchors. lol..

tux
01-25-2010, 08:42 PM
Me too, anchors away shipmates. lol