Making a table using div in HTML - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Table

Description

Making a table using div in HTML

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsum dolor sit</title> 
  <style>
.table<!--from   ww  w .j  a va  2 s  . c  om-->
 {
   display:table;
   border:2px solid;
   width:100%;
   text-transform:capitalize;
}

.table-row
 {
   display:table-row;
   border:2px solid;
}

.table-cell
 {
   display:table-cell;
   vertical-align:middle;
   border:2px solid;
}
</style> 
 </head> 
 <body translate="no"> 
  <div class="table"> 
   <div class="table-row"> 
    <div class="table-cell">
      Lorem ips 
    </div> 
    <div class="table-cell">
      Lorem ips 
    </div> 
   </div> 
   <div class="table-row"> 
    <div class="table-cell">
      Lorem ipsu 
    </div> 
    <div class="table-cell"> 
     <div>
       Lorem i 
     </div> 
     <div>
       Lorem ipsum d 
     </div> 
     <ul> 
      <li>Lorem</li> 
      <li>Lorem</li> 
      <li>Lorem </li> 
     </ul> 
    </div> 
   </div> 
   <div class="table-row"> 
    <div class="table-cell">
      Lorem ipsu 
    </div> 
    <div class="table-cell"> 
     <div class="table"> 
      <div class="table-row"> 
       <div class="table-cell">
         Lorem ipsu 
        <div>
          Lor 
        </div> 
        <div>
          Lor 
        </div> 
        <div>
          Lor 
        </div> 
       </div> 
       <div class="table-cell">
         Lorem ipsu 
        <div>
          Lor 
        </div> 
        <div>
          Lor 
        </div> 
        <div>
          Lor 
        </div> 
       </div> 
       <div class="table-cell">
         Lorem ipsu 
        <div>
          Lor 
        </div> 
        <div>
          Lor 
        </div> 
        <div>
          Lor 
        </div> 
       </div> 
      </div> 
     </div> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials