Submit Your Article
Home Articles News Tutorials Videos Add An Article
Topics: Design Photoshop Programming PHP CSS Java Database Web Development Javascript Ajax
– Close + Open

Find Out More About DevWebPro!

Sign up for the newsletter


» Terms & Conditions

Welcome to the New DevWebPro!

DevWebPro Includes:
  Hundreds Of Tutorials   Developer News
  Unique Gadget Videos   Tons of Topics to Discuss
  Expert Advice   We Will Publish Your Articles

Create Digg Style Pagination

By: Kasted
Sunday, February 4th, 2007
Text: Decrease Font Size Increase Font Size | Print Print Article | Share: Delicious Digg StumbleUpon Post to Twitter Post to Facebook

Pagination If you have a website or blog it usaully generates pages. For this tutorial we will look at a easy and quick way to display these pages. If you don’t know what pagination is, it is listing page numbers and Next Page and Previous Page, it is usally put the at the bototm of a page, and is used for navigating the next page, previous page, or a certain page number. Now that we know what we are making, lets get started.

Below is our stylesheet code, to select it click the text area.

Now lets get to our HTML! You may notice that we use an unordered list. We use this because it is probaly the easiest for displaying this type of thing in an organized manner. To get our list items to match up inline, we use the css propertie “DISPLAY: INLINE”, this is commonly used with menus, navigation, and forms.

Please note that any page that you would like to go to a anchor, and any page isn’t active, uses the class “nolink”. The Previous Page link uses this because we are on page #1 by default in this tutorial, so there isn’t any previous page to go to. Also note that any page that you are currently on it uses the class “current” on the list item.

For a full demo of what you just made click here.

Topics: , ,

About the Author:

Leave a Comment

DevWebPro is an iEntry Network ® publication - © 1998-2010 All Rights Reserved