Wednesday, 27 July 2016

Bootstrap Basic Classes

Container class :

Use .container for a responsive fixed width container.

Css for container in ---   .container{width:1170px;} 

<div class="container">  ...</div>


Use .container-fluid for a full width container, spanning the entire width of your viewport.

Css for container-fluid in ---  .container-fluid{width:100%;}

<div class="container-fluid">  ...</div>


Basic Structure Code :

How to Use Bootstrap :

STEP 1: Download Bootstrap.zip file 


STEP 2: Link Bootstrap Css    in <head></head>  tag 

<link rel="stylesheet" href="css/bootstrap.css" />
<script src="js/jquery.min.js"  ></script >
<script src="js/bootstrap.min.js"></script>



  1. <!DOCTYPE html><html lang="en">
  2. <!---Start head section --->
  3. <head> 
  4.  <title>Bootstrap Case</title> 
  5.  <meta charset="utf-8"> 
  6. <meta name="viewport" content="width=device-width, initial-scale=1"> 
  7. <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

  8. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>  
  9. <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>  
  10. </head>
  11. <!---End head section --->
  12. <body>  <!---Start Bootstrap Class here section --->

  13. <div class="container"> <!---Container class use here --->

  14. <div class="row">  <!--- Start 1st row class use here --->
  15. <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12   "   style=" min-height: 150px !important;    background: #31961f !important">
  16. <h2 align="center" >Col-3</h2>
  17. </div>
  18. <div class="col-lg-9 col-md-9 col-sm-9 col-xs-12"  style="min-height: 150px !important;    background: red !important">
  19. <h2 align="center" >Col-9</h2>
  20. </div>
  21. </div>  <!--- End 1st row class use here --->

  22. <div class="row">  <!--- Start 2st row class use here --->
  23. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"  style=" min-height: 400px !important;    background: #ddd !important">
  24. <h2 align="center" >Col-12</h2>
  25. </div>
  26. </div> <!--- End  2st row class use here --->

  27. <div class="row">  <!--- Start 3st row class use here --->
  28. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12" style=" min-height: 150px !important;    background: #000 !important">
  29. <h2 align="center" >Col-2</h2>
  30. </div>

  31. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12" style=" min-height: 150px !important;    background: #31961f !important">
  32. <h2 align="center" >Col-2</h2></div>

  33. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12" style=" min-height: 150px !important;    background: #000 !important">
  34. <h2 align="center" >Col-2</h2>
  35. </div>

  36. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12" style=" min-height: 150px !important;    background: #31961f !important">
  37. <h2 align="center" >Col-2</h2>
  38. </div>

  39. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12" style=" min-height: 150px !important;    background: #000 !important"><h2 align="center" >Col-2</h2></div>


  40. <div class="col-lg-2 col-md-2 col-sm-2 col-xs-12" style=" min-height: 150px !important;    background: #31961f !important"><h2 align="center" >Col-2</h2></div>

  41. </div> <!--- End  3st row class use here --->

  42. </div> <!--- End Container class here  --->
  43. <!---End Bootstrap Class here section --->
  44. </body>
  45. </html>


Output :


No comments:

Post a Comment

Thanks For Message . Keep in touch