Exercise:
Use a Bootstrap class to group the panels below.
Hint
Hint: Use the .panel-group class.
Edit This Code:
See Result »
<!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <!-- Add something here --> <div class="panel panel-default"> <div class="panel-heading">Panel Header</div> <div class="panel-body">Panel Content</div> </div> <div class="panel panel-default"> <div class="panel-heading">Panel Header</div> <div class="panel-body">Panel Content</div> </div> <div class="panel panel-default"> <div class="panel-heading">Panel Header</div> <div class="panel-body">Panel Content</div> </div> <!-- End something here --> </div> </body> </html>
Result:
Show Answer
Correct Code:
<!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="panel-group"> <div class="panel panel-default"> <div class="panel-heading">Panel Header</div> <div class="panel-body">Panel Content</div> </div> <div class="panel panel-default"> <div class="panel-heading">Panel Header</div> <div class="panel-body">Panel Content</div> </div> <div class="panel panel-default"> <div class="panel-heading">Panel Header</div> <div class="panel-body">Panel Content</div> </div> </div> </div> </body> </html>
Correct Result:
Hide Answer
Privacy Policy