1.

How to change the size of Bootstrap well?

Answer»

Bootstrap Well is a container that adds a rounded border around an element. It adds padding and gray background color.

The size of Well can be changed in Bootstrap USING well-sm and well-lg classes. Here, we are implementing them:

<!DOCTYPE HTML&GT; <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>Size of 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:We can also create a Bootstrap Well with the default size:

<div class = "well">    This is my well! </div

The FOLLOWING is an example WHEREIN we have created a Bootstrap Well with the default size: 

<!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”:



Discussion

No Comment Found