Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Bootstrap Panels

Bootstrap Panels

In this section we will discuss Bootstrap panels. The panel component is used to be inserted into the DOM.

To get a basic panel, you only need to add the

element. .panel and .panel-default class.

The example is as follows:



This is a Basic panel

View the example online

The above example displays as follows:

paneldeafult_demo


Panel Heading

We can add a panel heading in the following two ways:

  • Using the **.panel-heading** class, you can easily add a header container to your panel.
  • Use

    -

    element and use the ** .panel-title** class to add a pre-styled title to it.

The following examples demonstrate two different implementation methods:



Panel heading without title
Panel content

Panel With title

Panel content

View the example online

The above example displays as follows:

panelheading_demo


Panel Footer

You can add a footer to a panel; you only need to add the

element. .panel-footer class. The example is as follows:



This is a Basic panel

View the example online

The above example displays as follows:

panelfooter_demo

Note that the panel footer does not inherit contextual colors, because it is not in the preceding content.


Panels with Contextual Colors

You can use the panel-primary, panel-success, panel-info, panel-warning, and panel-danger classes to set panels with contextual colors. The example is as follows:



Panel title

This is a Basic panel

Panel title

This is a Basic panel

Panel title

This is a Basic panel

Panel title

This is a Basic panel

Panel title

This is a Basic panel

View the example online

The above example displays as follows:

panelstyles_demo


Panels with Tables

We can use the .table class inside a panel to create a borderless table. The .panel-body class can be used to define text content outside the table. The example is as follows:



Panel title

This is a Basic panel
ProductPrice
Product A200
Product B400
Panel Heading
ProductPrice
Product A200
Product B400

View the example online

The above example displays as follows:

paneltable_demo


Panels with List Groups

We can include list groups in any panel by adding the

element. .panel and .panel-default class to create the panel and adding a list inside it. The example is as follows:



Panel heading

This is a Basic panel content. This is a Basic panel content. This is a Basic panel content.This is a Basic panel content. This is a Basic panel content.This is a Basic panel content. This is a Basic panel content.

  • Free Domain Name Registration
  • Free Window Space hosting
  • Number of Images
  • 24*7 support
  • Renewal cost per year

View the example online

The above example displays as follows:

panellistgroups_demo