Topic: Scroll to top of post

I am going crazy trying to get this to work.

I added just the basic <a href'#top">Top</a> to my viewtopic.php file. It does works but the problem is that if I use

<a id="top" name="top" />

as is instructed in one of the forums post I then get the hover color under certain text. It depends on where I place it in the main.tpl file. If I place it at the bottom and hover over the jump to forum are the the hover class is used although it is not a link. Why wouldn't this just work in the viewtopic file?

Thanks
Bingiman.

2

Re: Scroll to top of post

Thats because you can't close an <a> tag like that. You need to get rid of the slash and add a closing </a>

What I don't understand is why you are bothering with an anchor. If you just want to go back to the top use the id from the wrapper div.

Re: Scroll to top of post

so you mean just use something like this: <a id="top"></a>? I placed that after the body tag and it seems to work. Is that correct.

Thanks for your help
Bingiman

4

Re: Scroll to top of post

Not quite. I mean use an id that already exists e.g. <a href="#punwrap">Top</a> or <a href="#brdheader">Top</a>. That way you don't have emply <a> tags cluttering up the place.

If you have problems and have to use an <a> tag then try <a id="top" name="top"><!-- --></a>

Re: Scroll to top of post

Thank you Paul. It worked like a charm.

Re: Scroll to top of post

BTW, it doesn't have to be an A tag. It should work with any other tag. e.g.

<h1 id="name">Forum Name</h1>

Re: Scroll to top of post

BTW, it doesn't have to be an A tag. It should work with any other tag. e.g.

I seem to remeber in the IE 3/4 days that didn't work on one of the browsers (either IE or netscape). Might be safer to just use the a tag, presumably some of the lesser know browsers won't recognize a <span id="top"><!-- top --></span>.

echo "deadram"; echo; fortune;