Forum Moderators: open

Message Too Old, No Replies

Centering Named Anchors

         

Rott

10:30 pm on May 27, 2004 (gmt 0)

10+ Year Member



Hey Yall,

I want to click a link on a left hand pane navigation tree that links to a named anchor I have on a right hand pane html document. I need the right hand HTML page centered relative to the named anchor tag, and not the document as a whole in the browser.

It seems the built in function of the named anchor tag will navigate to the link at the bottom of the page that renders.

Is there a way to modify this behavior, or even set it so it will put the link top or center or bottom relative to the whole document if preferred?

Or is there a more preferable alternative?

Thanx Rott

Purple Martin

11:18 pm on May 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a browser behaviour and therefore you don't have direct control over it, and nor should you. Browsers work the way they do for carefully thought-out reasons. People get used to their browser's behaviour and if you change it you'll only annoy them.

Having said that, it's theoretically possible to use JavaScript to make the document scroll by half the inner window height after the link is clicked.

Rott

11:37 pm on May 27, 2004 (gmt 0)

10+ Year Member



Thanks,

But First off, I have My HTML Browser control embedded within my own windows application and normal IE functionality is not an issue to the user, in fact they dont expect normal browser behavior.

Secondly I need to center the document relative to the LINK, not the entire document.

Rott

Rott

11:39 pm on May 27, 2004 (gmt 0)

10+ Year Member



Sorry,

I didnt read the second part correctly, I will give it a try

Thanx,

Rott