Topic: Html window position

well my question is a little wierd so please try to understand it big_smile big_smile

i decided not to use frames in my html page. What i want is that in a certain html pages when you switch for html to another the positon view of the page wont change. As i press on a link that goes to another html, i dont want that the pages view well go back on top and that i will need to scroll down again. i mean that i want the html.page view to be steady,  to be set on a certain view position.

Vote up Vote down

Re: Html window position

I'm not quite sure what you're saying - but it's a good thing you're not using frames - you shouldn't.  Maybe a bookmark might help with your issue?

Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: Html window position

I think Thelma is referring to an anchor. You can have an anchor for the same page so that when you click the link it will take you to another place on the same page (like a link at the bottom of the page that says "top" and takes you back up to the top) or you can have a link that takes you to a place on another page that is not the top, it can be anywhere on the page.

The link on the first page would be:-
<a href="page5.html#item15">Item 15</a>

and in the code for the page 5 just above the heading for Item 15 you would put in the anchor code:-

<a id="item15"></a>

You can use absolute urls if more convenient:-
<a href="http://www.your-domain.com/page5.html#item15">Item 15</a>

and

<a id="item15"></a> on page 5

Last edited by Wickham (March 9, 2009 3:32 pm)

Vote up Vote down

Re: Html window position

Thanks i think this is what i'm looking for, but i need some directions.
what do you mean above the heading?

In pageA.html : i want that when i press on the "id=Education" (link in pageA) to appear on the page position view of the "id=CV" in pageB.html.
i am giving this example because i did understand what you have given me, but i tried to aply but with no sucess. can you apply your instructions depending on my examples.

Vote up Vote down

Re: Html window position

Make your link on the first page
<a href="pageA.html#education">Education</a>

You put the anchor <a id="education"></a> at the place on the other page that you want to show at the top of the viewing window, so that a page appears to start with a scroll.

This assumes that both files are in the same folder/directory.

When I said Heading I was just assuming that you have a paragraph heading that you want to show at the top of the viewing window. You can have several anchors on a page with their different links and ids.

Vote up Vote down