Css tables for rowspan and colspan - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Row

Description

Css tables for rowspan and colspan

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
body * {<!--from   w  ww  .j av a 2s. c  o m-->
   margin:0;
}

.tablelayout {
   display:table;
   width:501px;
   text-align:center;
   margin:auto;
}

h1 {
   width:100px;
}

.cell {
   display:table-cell;
   vertical-align:middle;
   box-shadow:inset 0 0 2px green;
}

.row {
   display:table-row;
}

.w100 {
   width:100%;
}

.caption {
   display:table-caption;
   caption-side:left;
   vertical-align:middle;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="tablelayout"> 
   <h1 class="caption">Lorem </h1> 
   <div class="cell "> 
    <h2 class="tablelayout w100 ">Lorem ip</h2> 
    <div class="tablelayout  w100"> 
     <div class="row"> 
      <p class="cell">Lorem </p> 
      <p class="cell">Lorem </p> 
     </div> 
     <div class="row"> 
      <p class="cell">Lorem </p> 
      <p class="cell">Lorem </p> 
     </div> 
     <div class="row"> 
      <p class="cell">Lorem </p> 
      <p class="cell">Lorem </p> 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials