Bootstrap Pager Intro

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><!--  w w  w .j a v  a  2  s . c  om-->
<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><!--from   w  w w.j ava2 s.c  o m-->
<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 av a2  s  . c  o  m-->
<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 »
    Example »




Accordion
Alert
Auto Complete
Badge
Breadcrum
Button
Carousel
Collapse
Dialog
Dropdown
Form
Icon
Jumbotron
Label
Layout
List
List Group
Media
Navigation Bar
Pager
Page Header
Panel
Paragraph
Pills
Popover
ProgressBar
ScrollSpy
Switch
Tab
Table
Thumnail
Tooltip
Tree
Well