Monday, 7 May 2018

011 Bootstrap Pagination

Bootstrap Pagination
Pagination is a technique to organize a large content into several part , later show part one by one. "pagination" class is used to do pagination.


Example


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
       <ul class="pagination">
            <li><a href="#">«</a></li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
             <li><a href="#">4</a></li>
             <li><a href="#">5</a></li>
          <li><a href="#">»</a></li>
       </ul>
</div>
</body>
</html>

 Output :
 




Pagination with Disabled and Active States
Two class is used for this purpose.
  • disabled
  • active
Example


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
<ul class="pagination">
        <li class="disabled"><a href="#">«</a></li>
        <li class="active"><a href="#">1</a></li>
        <li><a href="#">2</a></li>
        <li><a href="#">3</a></li>
        <li><a href="#">4</a></li>
        <li><a href="#">5</a></li>
       <li><a href="#">»</a></li>
</ul>
</div>
</body>
</html>

 Output :






Sizes of Pagination

you can change the size of pagination by "pagination-lg","pagination-sm","pagination"

  • pagination-lg
  • pagination-sm
  • pagination 
Example


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
<ul class="pagination pagination-lg">
<li ><a href="#">«</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">»</a></li>
</ul>
<br />
<ul class="pagination pagination-sm">
<li ><a href="#">«</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">»</a></li>
</ul>
<br />
<ul class="pagination">
<li ><a href="#">«</a></li>
<li><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">»</a></li>
</ul>
</div>
</body>
</html>


Output :









Breadcrumbs

    Another form for pagination is breadcrumbs
    That comes under the single well format 


Example


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
<ul class="breadcrumb">
<li><a href="#">C:</a></li>
<li><a href="#">My Computer</a></li>
<li><a href="#">Desktop</a></li>
<li><a href="#">My Document</li>
</ul>
<div class="container">
</body>
</html>







010 Bootstrap Pager


Bootstrap Pager
 

Pager are user for navigating from one page to another.Generally "previous" and "next"  keyword and buttons / link used for this purpose."pager" class is used for this purpose.

Example
  
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
           <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
           <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
        <div class="container">
                        <ul class="pager">
                                <li><a href="#"> Previous</a></li>
                                <li><a href="#">Next </a></li>
                       </ul>
        </div>
</body>
</html>

Output :





Pager Alignment 

Pager are aligned center by default.But if you use .previous and .next class.The button with left and right aligned accordingly.

Example


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
            <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
           <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
            <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
     <div class="container">
                      <ul class="pager">
                      <li class="previous"><a href="#"> Previous</a></li>
                       <li class="next"><a href="#">Next </a></li>
                  </ul>
</div>
</body>
</html>



Output :






Pager Active and deactive
You can active and deactive pager element by applying "active" and "disabled" class.

Example




<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
<ul class="pager">
<li class="previous disabled"><a href="#"> Previous</a></li>
<li class="next"><a href="#">Next </a></li>
</ul>
</div>
</body>
</html>


Output :

009 Bootstrap Wells

Bootstrap Wells
Wells add a rounded border around an element.The Border are grey background with padding.You need to add "well" class only.


Example

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        <meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
<div class = "well">This is Example of Well</div>
</div>
</body>
</html>

Output :

This is Example of Well


Wells Sizing
well-lg , well-sm
optional classes are used to change the size of well . These classes are used  with .well class. These manage the padding, making the well larger or smaller depending on the class.

 Example
 
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta name="viewport" content="width = device-width, initial-scale = 1">
<body>
<div class="container">
<div class = "well">This is Example of Well</div>
<div class = "well well-lg">This is Example of Well</div>
<div class = "well well-sm">This is Example of Well</div>

</div>
</body>
</html>



Output :
This is Example of Well
This is Example of Well
This is Example of Well









বাঙালির বেড়ানো সেরা চারটি ঠিকানা

  বাঙালি মানে ঘোড়া পাগল | দু একদিন ছুটি পেলো মানে বাঙালি চলল ঘুরতে | সে সমুদ্রই হোক , পাহাড়ি হোক বা নদী হোক। বাঙালির ...