All for Joomla All for Webmasters

Bootstrap Wells

In Bootstrap, wells are used to add a rounded border around an element with a gray background color and some padding. It is like a container that displays the content.

The class .well is used with <div> element to add well.

Example:

  1.  <!DOCTYPE html>
  2. <html lang=“en”>
  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. </head>
  9. <body>
  10. <div class=“container”>
  11.   <h2>Well Example</h2>
  12.   <div class=“well”>Hi! I am a Basic Well.</div>
  13. </div>
  14. <script src=“https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>
  15. <script src=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js”></script>
  16. </body>
  17. </html>

Bootstrap Wells Size

By Default, wells size is medium but you can change the size of the well according to your need. The .well-sm class is used for small wells and .well-lg class is used for large wells.

Example:

  1. <!DOCTYPE html>
  2. <html lang=“en”>
  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. </head>
  9. <body>
  10. <div class=“container”>
  11.   <h2>Well Size</h2>
  12.   <div class=“well well-sm”>This is Small Well</div>
  13.   <div class=“well”>This is Medium Well (By Default)</div>
  14.   <div class=“well well-lg”>This is Large Well</div>
  15. </div>
  16. <script src=“https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js”></script>
  17. <script src=“http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js”></script>
  18. </body>
  19. </html>
PinIt
submit to reddit

Leave a Reply

Top