<!DOCTYPE html>
<html>
  <head>
    
    <!-- CSS -->
    <link href="https://cdn.datatables.net/2.0.0/css/dataTables.dataTables.min.css" rel="stylesheet">
    
    <!-- JS -->
    <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
    <script src="https://cdn.datatables.net/2.0.0/js/dataTables.min.js"></script>    
    <script src="https://cdn.datatables.net/plug-ins/2.0.0/sorting/natural.js"></script>
    
    <meta charset=utf-8 />
    <title>DataTables - JS Bin</title>
  </head>
  <body>
      <div class="container">
      <div id="resize_wrapper">
        <table id="example" class="display nowrap" width="100%">
        <thead>
          <tr>
            <th>Name</th>
          </tr>
        </thead>
        <tfoot>
          <tr>
            <th>Name</th>
          </tr>
        </tfoot>
        <tbody>
          <tr>
            <td>Tigerezé Nixon</td>
          </tr>
          <tr>
            <td>Garrett Winters</td>
          </tr>
          <tr>
            <td>Sonya Frost</td>
          </tr>
          <tr>
            <td>Jena Gaines</td>
          </tr>
          <tr>
            <td>Quinn Flynn</td>
          </tr>
          <tr>
            <td>Charde Marshall</td>
          </tr>
          <tr>
            <td>Haley Kennedy</td>
          </tr>
          <tr>
            <td>Tatyana Fitzpatrick</td>
          </tr>
          <tr>
            <td>Michael Silva</td>
          </tr>
        </tbody>
          
      </table>
    </div>
    </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;
}
#resize_wrapper {
      position: absolute;
      top: 3em;
      left: 1em;
      right: 1em;
      bottom: 1em;
}
 
var table1 = $('#example').DataTable({
   
  columns: [
    {  
      data: 0, 
      type: 'natural' 
    } 
  ]
  
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers