View Full Version : Css Pagination?

03-21-2005, 08:40 PM
I'm wondering how one would accomplish linking to a previous or subsequent page.

Here is the website and as one can see at the bottom of the page I have a Back or next unlinked. http://www.jesmaharry.com/new/studio.htm and the same on http://www.jesmaharry.com/new/studio.htm and one other page.

03-21-2005, 09:04 PM
Depends on what the goal is.

If you're hoping to have visitors view pages in a particular order, you would simply hardcode the appropriate addresses into the links:

<a href="page_1.html">previous</a>

<a href="page_2.html">next</a>

On the other hand, if you want visitors to cycle through their browser history, you need a bit of javascript. Be warned however, if someone doesn't have javascript enabled, clicking the links won't have any effect.

<a href="#" onclick="javascript:history.go(-1)">previous</a>

<a href="#" onclick="javascript:history.go(1)">next</a>