Bootstrap Pager

Default Pager

Previous and next links for simple pagination implementations with light markup and styles.

By default, the pager centers links.


<!DOCTYPE HTML>
<html> 
<head> 
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--from ww w.  jav  a2  s. co m-->
<body style='margin:20px;'>

  <ul class="pager">
     <li><a href="#">Previous</a></li>
     <li><a href="#">Next</a></li>
  </ul>

</body> 
</html>

Click to view the demo

Alternatively, you can align each link to the sides:


<!DOCTYPE HTML>
<html> 
<head> 
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--   w w  w .j  a va  2s.  c  om-->
<body style='margin:20px;'>

    <ul class="pager">
      <li class="previous"><a href="#">&larr; Older</a></li>
      <li class="next"><a href="#">Newer &rarr;</a></li>
    </ul>
</body> 
</html>

Click to view the demo

Optional disabled state

Pager links also use the general .disabled utility class from the pagination.


<!DOCTYPE HTML>
<html> 
<head> 
<link href="http://java2s.com/style/bootstrap.min.css" rel="stylesheet">
</head><!--  w w w  .  j a  v a  2s  .  c om-->
<body style='margin:20px;'>

    <ul class="pager">
      <li class="previous disabled"><a href="#">&larr; Older</a></li>
      <li class="next"><a href="#">Newer &rarr;</a></li>
    </ul>
</body> 
</html>

Click to view the demo





















Home »
  Bootstrap »
    Bootstrap »




Introduction
Basic HTML Style
List
Table
Form
Layout
Navigation Bar
Button
Control