HTML CSS examples for CSS Widget:Table Layout
change table layout depending on resolution
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .table.mobile {<!--from ww w . j ava2 s . c o m--> display:none } .table.desktop { display:inline } @media (max-width: 600px) { .table.desktop { display:none } .table.mobile { display:inline } } </style> </head> <body> <table class="table table-responsive desktop"> <thead> <tr> <td>Lorem ip</td> <td>Lorem ip</td> <td>Lorem ip</td> </tr> </thead> <tfoot></tfoot> <tbody> <tr> <td>Lorem </td> <td>Lorem </td> <td>Lorem </td> </tr> </tbody> </table> <table class="table table-responsive mobile"> <thead> <tr> <td>Lorem </td> <td>Lore</td> </tr> </thead> <tfoot></tfoot> <tbody> <tr> <td>Lorem ip</td> <td>Lorem </td> </tr> <tr> <td>Lorem ip</td> <td>Lorem </td> </tr> <tr> <td>Lorem ip</td> <td>Lorem </td> </tr> </tbody> </table> </body> </html>