ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Pagination Sizing
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <title>Bootstrap 4 Pagination Sizing</title> </head> <body> <div class="container mt-4"> <h1>Bootstrap 4 Pagination Sizing </h1> <p class="text-justify"> In this example, you will learn how to control Bootstrap 4 pagination size. To create smaller & large size pagination, use .pagination-sm & .pagination-lg class respectively. </p> <nav> <ul class="pagination pagination-sm"> <li class="page-item"> <a class="page-link" href="#">Prev</a> </li> <li class="page-item active" aria-current="page"> <span class="page-link"> 1 </span> </li> <li class="page-item"> <a class="page-link" href="#">2</a> </li> <li class="page-item"> <a class="page-link" href="#">3</a> </li> <li class="page-item"> <a class="page-link" href="#">4</a> </li> <li class="page-item"> <a class="page-link" href="#">Next</a> </li> </ul> </nav> <h2>Pagination:Large Size</h2> <p class="text-justify">To make larger page item use .pagination-lg to the the pagination container base class. </p> <nav> <ul class="pagination pagination-lg"> <li class="page-item"> <a class="page-link" href="#">Prev</a> </li> <li class="page-item active" aria-current="page"> <span class="page-link"> 1 </span> </li> <li class="page-item"> <a class="page-link" href="#">2</a> </li> <li class="page-item"> <a class="page-link" href="#">3</a> </li> <li class="page-item"> <a class="page-link" href="#">4</a> </li> <li class="page-item"> <a class="page-link" href="#">Next</a> </li> </ul> </nav> </div> <!--/container--> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </body> </html>
Output :
Running