HTML CSS examples for Bootstrap Class List:table-responsive
table-responsive - Makes a table responsive by adding a horizontal scrollbar when needed
<!DOCTYPE html> <html> <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"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head><!-- w w w .j a va 2 s . com--> <body> <div class="container"> <h2>Table</h2> <div class="table-responsive"> <table class="table"> <thead> <tr> <th>#</th> <th>Firstname</th> <th>Lastname</th> <th>Age</th> <th>City</th> <th>Country</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> <tr> <td>2</td> <td>A</td> <td>P</td> <td>W</td> <td>N</td> <td>S</td> </tr> </tbody> </table> </div> </div> </body> </html>