Saved Bookmarks
| 1. |
What is a Bootstrap Well? |
|
Answer» Bootstrap WELL is a container that adds a rounded border around an element. It adds padding and gray background color. Let us now learn how to create a Bootstrap Well: <div class = "well"> This is my well! </div>We will now implement the above in a web page: <!DOCTYPE html> <html LANG="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <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> </head> <body> <div class="container"> <h2>Learning about WELLS in Bootstrap</h2> <div class = "well"> This is my well! </div> </div> </body> </html>Above creates the following well: The SIZE of Well can also be changed in Bootstrap using well-sm and well-lg classes. Here, we are implementing them: <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Well Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <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> </head> <body> <div class="container"> <h2>Learning about Wells in Bootstrap</h2> <div class = "well well-sm"> This is my well! Smaller! </div> <div class = "well"> This is my well! Medium! </div> <div class = "well well-lg"> This is my well! LARGE! </div> </div> </body> </html>Here is the output: |
|