<!DOCTYPE html>
<html>
  <head>
    <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
    <link href="https://nightly.datatables.net/css/dataTables.dataTables.css" rel="stylesheet" type="text/css" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://nightly.datatables.net/js/dataTables.js"></script>
    <meta charset=utf-8 />
    <title>DataTables - JS Bin</title>
  </head>
  <body>
    <div class="container">
      <table id="example" class="display nowrap" width="100%">
        <thead>
          <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Age</th>
            <th>Start date</th>
            <th>Salary</th>
            <th>Salary 1</th>
            <th>Salary 2</th>
            <th>Salary 3</th>
            <th>Salary 4</th>
            <th>Salary 5</th>
            <th>Salary 6</th>
            <th>Salary 7</th>
          </tr>
        </thead>
        <tfoot>
          <tr>
            <th>Name</th>
            <th>Position</th>
            <th>Office</th>
            <th>Age</th>
            <th>Start date</th>
            <th>Salary</th>
            <th>Salary</th>
            <th>Salary</th>
            <th>Salary</th>
            <th>Salary</th>
            <th>Salary</th>
            <th>Salary</th>
            <th>Salary</th>
          </tr>
        </tfoot>
        <tbody>
          <tr>
            <td>Tiger Nixon</td>
            <td>System Architect</td>
            <td>Edinburgh</td>
            <td>61</td>
            <td>2011/04/25</td>
            <td>$3,120</td>
            <td>$3,120</td>
            <td>$3,120</td>
            <td>$3,120</td>
            <td>$3,120</td>
            <td>$3,120</td>
            <td>$3,120</td>
            <td>$3,120</td>
          </tr>
          <tr>
            <td>Garrett Winters</td>
            <td>Director</td>
            <td>Edinburgh</td>
            <td>63</td>
            <td>2011/07/25</td>
            <td>$5,300</td>
            <td>$5,300</td>
            <td>$5,300</td>
            <td>$5,300</td>
            <td>$5,300</td>
            <td>$5,300</td>
            <td>$5,300</td>
            <td>$5,300</td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>
 
body {
  font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: #fff;
}
div.dt-container div.dt-layout-row:first-child div.dt-layout-cell:first-child div {
  display: inline-block;
  margin-right: 1em;
}
 
var table = new DataTable('#example', {
    dom:
        "<'card card-flush'" +
        "<'card-header mt-6'" +
        "<'card-title' f>" +
        "<'card-toolbar'<'d-flex justify-content-end' B>>" +
        ">" + // card-header
        "<'card-body pt-0'" +
        "<'table-responsive' tr>" +
        "<'row'" +
        "<'col-sm-12 col-md-5 d-flex align-items-center justify-content-center justify-content-md-start' li>" +
        "<'col-sm-12 col-md-7 d-flex align-items-center justify-content-center justify-content-md-end' p>" +
        ">" + // row
        ">" + // card-body
        ">", // card"
});
Output 300px

This bin was created anonymously and its free preview time has expired. Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers