Position a table on top of another table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Position

Description

Position a table on top of another table

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">
#table1 {<!-- w  w w . j  av a  2s.c  o  m-->
   background:Chartreuse;
}

#table2 {
   background:yellow;
   margin-top:-25px
}
</style> 
 </head> 
 <body> 
  <table id="table1"> 
   <tbody> 
    <tr> 
     <td height="50">Lorem i</td> 
    </tr> 
   </tbody> 
  </table> 
  <table id="table2"> 
   <tbody> 
    <tr> 
     <td height="50">Lorem i</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials