make table take up 100% of remaining space - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Size

Description

make table take up 100% of remaining space

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">
* {<!--from  w ww.  j  av  a  2s .  c  o m-->
   margin:0;
   padding:0;
}

#a {
   background-color:Chartreuse;
}

#b {
   background-color:yellow;
   height:51px;
   margin-left:51px;
   width:-webkit-calc(100% - 51px);
   width:-moz-calc(100% - 51px);
   width:calc(100% - 51px);
}
</style> 
 </head> 
 <body> 
  <div id="a"> 
   <table id="b"> 
    <tbody> 
     <tr> 
      <td></td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials