Panels with Contextual States - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Panel

Introduction

You can add contextual state classes like .panel-primary, .panel-success, .panel-info, .panel-warning, or .panel-danger on the panel components.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Example of Bootstrap 3 Panels with Contextual States</title>
    <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/1.11.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
 </head><!--  www  .  j  a v a  2  s. co m-->
 <body>
  <div>
   <div class="panel panel-primary">
    <div class="panel-heading">
     <h3 class="panel-title">301 Moved Permanently</h3>
    </div>
    <div class="panel-body">
     The requested page has been permanently moved to a new location.
    </div>
   </div>
   <div class="panel panel-success">
    <div class="panel-heading">
     <h3 class="panel-title">200 OK</h3>
    </div>
    <div class="panel-body">
     The server successfully processed the request.
    </div>
   </div>
   <div class="panel panel-info">
    <div class="panel-heading">
     <h3 class="panel-title">100 Continue</h3>
    </div>
    <div class="panel-body">
     The client should continue with its request.
    </div>
   </div>
   <div class="panel panel-warning">
    <div class="panel-heading">
     <h3 class="panel-title">400 Bad Request</h3>
    </div>
    <div class="panel-body">
     The request cannot be fulfilled due to bad syntax.
    </div>
   </div>
   <div class="panel panel-danger">
    <div class="panel-heading">
     <h3 class="panel-title">503 Service Unavailable</h3>
    </div>
    <div class="panel-body">
     The server is temporarily unable to handle the request.
    </div>
   </div>
  </div>
 </body>
</html>

Related Tutorials