Link to the top of each page (Design/Themes)

by Birgit (nr) @, Monday, August 18, 2008, 17:48 (5701 days ago)
edited by Alex, Wednesday, August 27, 2008, 14:42

Hi all,

the users of my forum are wishing a link at the bottom of each page which goes back to the beginning of the page. They don't want to scroll to the beginning. How can I fulfil this request?

Greetings,
Birgit

locked
5366 views

Link to the top of each page

by davwat, Tuesday, August 19, 2008, 12:42 (5700 days ago) @ Birgit (nr)
edited by Alfie, Tuesday, August 19, 2008, 20:36

In the main.tpl file you could add something similar to what I have done.

On the first line in the body section:

<div><a name="top-of-page"></a></div>

In the footer section of the file integrate into it a hyperlink pointing to #top-of-page.

Take a look at the source code on the following page which will give you some idea of how it is done.
http://www.forest-of-dean.net/fodmembers/

Dave

--
Edit: BBCoded [Alfie]

locked
5337 views

Link to the top of each page

by Birgit ⌂ @, Tuesday, August 19, 2008, 17:30 (5700 days ago) @ davwat

Hi Dave,

thank you so much for your help! I really was successful by doing it - you are so great! ;-)

Have a nice evening,
Birgit

locked
5268 views
Avatar

Link to the top of each page

by Alfie ⌂, Vienna, Austria, Tuesday, August 19, 2008, 20:35 (5700 days ago) @ davwat
edited by Alfie, Thursday, August 21, 2008, 01:03

Dear Dave,

why do you add an invisible link (it's invisible, because no text is contained within the tags)?
Instead of

<div><a name="top-of-page"></a></div>
<div class="wb-main">

I would just give an id to the first <div>, e.g.,

<div class="wb-main" id="top-of-page">

This should do the job as well.

If others are interested in such a modification: The original source of mlf contains already a <div> which may be used as a target:

<div id="top">

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)

locked
5266 views

Link to the top of each page

by davwat, Thursday, August 21, 2008, 04:47 (5699 days ago) @ Alfie

Alfie

Thanks for your tips, I will try out what you have suggested.

Have a Good Day!
Dave

locked
5195 views

RSS Feed of thread