Set table cells Size - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Set table cells Size

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
td {<!--from   w ww. ja va2  s .  c o  m-->
   border:2px solid Chartreuse;
   width:34%;
   height:100%;
}

table {
   position:absolute;
   width:100%;
   height:100%;
}

tr {
   width:100%;
   height:34%;
}

tbody {
   width:100%;
   height:100%;
}

#square {
   width:100%;
   padding-bottom:100%;
   height:0;
}
</style> 
 </head> 
 <body> 
  <div id="square"> 
   <table> 
    <tbody> 
     <tr> 
      <td>L</td> 
      <td>L</td> 
      <td>L</td> 
     </tr> 
     <tr> 
      <td>L</td> 
      <td>L</td> 
      <td>L</td> 
     </tr> 
     <tr> 
      <td>L</td> 
      <td>L</td> 
      <td>L</td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials