Some text in the Modal..

Some text in the Modal..

Bootstrap Tutorial: Bootstrap Tables / Bordered / Classes! | BJ Creations

Type something and hit enter

ads here
On
advertise here

Bootstrap Basic Table

A basic Bootstrap table has a light padding and only horizontal dividers.
The .table the class adds basic styling to a table:

Example

FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
open editor

Striped Rows

The .table-striped class adds zebra-stripes to a table:

Example

FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
open editor

Bordered Table

The .table-bordered class adds borders on all sides of the table and cells:

Example

FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
open editor


Hover Rows

The .table-hover class adds a hover effect (grey background color) on table rows:

Example

FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
open editor

Condensed Table

The .table-condensed class makes a table more compact by cutting cell padding in half:

Example

FirstnameLastnameEmail
JohnDoejohn@example.com
MaryMoemary@example.com
JulyDooleyjuly@example.com
open editor

Contextual Classes

Contextual classes can be used to color table rows (<tr>) or table cells (<td>):

Example

FirstnameLastnameEmail
DefaultDefaultsondef@somemail.com
SuccessDoejohn@example.com
DangerMoemary@example.com
InfoDooleyjuly@example.com
WarningRefsbo@example.com
ActiveActivesonact@example.com
open editor
The contextual classes that can be used are:
ClassDescription
.activeApplies the hover color to the table row or table cell
.successIndicates a successful or positive action
.infoIndicates a neutral informative change or action
.warningIndicates a warning that might need attention
.dangerIndicates a dangerous or potentially negative action

Responsive Tables

The .table-responsive class creates a responsive table. The table will then scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, there is no difference:

Example

<div class="table-responsive">
  <table class="table">
    ...
  </table>
</div>
open editor

Click to comment