Bootstrap table-responsive class

Wrapping any .table in .table-responsive class, you will make the table scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.

To make a responsive table, you can try to run the following code −


Live Demo

<!DOCTYPE html>
      <title>Bootstrap Table</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel="stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
      <div class = "table-responsive">
         <table class = "table">
            <tr class = "success">
            <tr class = "active">
               <td>Web Dev</td>
            <tr class = "warning">
            <tr class = "danger">

Updated on: 12-Jun-2020

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started