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.