CSS Pagination Examples
CSS3 Tutorial
Simple Pagination
CompletedIf you have a website with lots of pages, you may wish to add some sort of pagination to each page:
To create a pagination, style a HTML list:
Example
ul.pagination {
display: inline-block;
padding: 0;
margin: 0;
}
ul.pagination li
{display: inline;}
ul.pagination li a {
color:
black;
float: left;
padding: 8px
16px;
text-decoration: none;
}
Try it Yourself
Active and Hoverable Pagination
CompletedHighlight the current page with an .active class, and use the :hover selector to change the color of each page link when moving the mouse over them:
Example
ul.pagination li a.active {
background-color:
#4CAF50;
color: white;
}
ul.pagination li
a:hover:not(.active) {background-color: #ddd;}
Try it Yourself
Rounded Active and Hoverable Buttons
CompletedHoverable Transition Effect
CompletedBordered Pagination
CompletedRounded Borders
CompletedSpace Between Links
CompletedPagination Size
CompletedCentered Pagination
CompletedMore Examples
CompletedBreadcrumbs
CompletedAnother variation of pagination is so-called "breadcrumbs":
Example
ul.breadcrumb {
padding: 8px 16px;
list-style: none;
background-color: #eee;
}
ul.breadcrumb li {display: inline;}
ul.breadcrumb li+li:before {
padding: 8px;
color: black;
content: "/\00a0";
}
Try it Yourself
