Responsive table columns and rows - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

Responsive table columns and rows

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
table {<!--   ww w. j  a  va2 s.  c o  m-->
   width:100%;
}

tr {
   display:inline;
}

td {
   margin:0;
   padding:0;
   width:51%;
   float:left;
   background:Chartreuse;
}

@media all and (min-width: 900px)  {
   tr {
      display:table-row;
   }
   
   td {
      float:none;
      min-width:301px;
   }

}
</style> 
 </head> 
 <body translate="no"> 
  <table> 
   <tbody> 
    <tr> 
     <td>Lorem i</td> 
     <td>Lorem i</td> 
     <td>Lorem i</td> 
    </tr> 
    <tr> 
     <td>Lorem i</td> 
     <td>Lorem i</td> 
     <td>Lorem i</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials