Table cells with different size - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Table cells with different size

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">
#tableContain {<!--   www .  j  ava2 s.  co m-->
   display:table;
   width:601px;
   margin:auto;
   border-spacing:11px;
}

#tabRow1, #tabRow2 {
   display:table-row;
}

#tabCell {
   display:table-cell;
   border:3px solid Chartreuse;
   padding:11px;
   border-collapse:collapse;
   width:34%;
}

img {
   width:201px;
}
</style> 
 </head> 
 <body> 
  <div id="tableContain"> 
   <div id="tabRow1"> 
    <div id="tabCell">
      Lorem ipsum dolor sit amet, consectetur adipis 
    </div> 
    <div id="tabCell"> 
     <img src="https://www.java2s.com/style/demo/Opera.png"> 
    </div> 
    <div id="tabCell">
      Lorem ipsum dolor sit amet, consectetur adipis 
    </div> 
   </div> 
   <div id="tabRow2"> 
    <div id="tabCell">
      Lorem ipsum dolor sit amet, consectetur adipis 
    </div> 
    <div id="tabCell"> 
     <img src="https://www.java2s.com/style/demo/Firefox.png"> 
    </div> 
    <div id="tabCell">
      Lorem ipsum dolor sit amet, consectetur adipis 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials