Make table size same to the div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Table

Description

Make table size same to the div

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">
.wrap {<!--  w  ww . ja v  a 2 s.  c om-->
   width:401px;
   height:501px;
   margin:0 auto;
}

.header {
   width:100%;
   height:51px;
   background-color:Chartreuse;
}

.body {
   width:100%;
   height:351px;
}

.left-side {
   position:relative;
   float:left;
   width:21%;
   height:100%;
   background-color:yellow;
}

.center {
   position:relative;
   float:left;
   width:61%;
   height:100%;
   background-color:blue;
}

.right-side {
   position:relative;
   float:left;
   width:21%;
   height:100%;
   background-color:pink;
}

.footer {
   width:100%;
   height:100px;
   background-color:OrangeRed;
}
</style> 
 </head> 
 <body> 
  <div class="wrap"> 
   <div class="header"></div> 
   <div class="body"> 
    <div class="left-side"></div> 
    <div class="center"></div> 
    <div class="right-side"></div> 
   </div> 
   <div class="footer"></div> 
  </div>  
 </body>
</html>

Related Tutorials