Make column span two cells - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Make column span two cells

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">
* {<!-- w w w.jav  a  2  s.c o m-->
   margin:0;
   padding:0;
}

table {
   border-collapse:collapse;
}

td {
   text-align:center;
   border:2px solid Chartreuse;
   padding:0 0 0 0;
   overflow:hidden;
}
</style> 
 </head> 
 <body> 
  <table width="400px"> 
   <tbody> 
    <tr> 
     <td style="width:100px">col1</td> 
     <td style="width:100px">col2</td> 
     <td style="width:100px">col3</td> 
     <td style="width:100px">col4</td> 
    </tr> 
    <tr> 
     <td style="width:100px">col1</td> 
     <td colspan="2" style="width:200px">col2 col3</td> 
     <td style="width:100px">col4</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials