How to create responsive table in Bootstrap

1 Answer

0 votes
<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet"
        href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
  
<body>
  
<div class="container">
  <h1>Bootstrap Rresponsive table</h1>
  <div class="table-responsive">          
  <table class="table">
    <thead>
      <tr>
        <th>#</th>
        <th>test col1</th>
        <th>test col2</th>
        <th>test col3</th>
        <th>test col4</th>
        <th>test col5</th>
        <th>test col6</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>1</td>
        <td>col1</td>
        <td>col2</td>
        <td>col3</td>
        <td>col4</td>
        <td>col5</td>
        <td>col6</td>
      </tr>
    </tbody>
  </table>
  </div>
</div>
  
</body>
</html>

 



answered Jul 8, 2017 by avibootz
...