Table styling column width - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Column

Description

Table styling column width

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">
table {<!--from  w w  w.ja v  a  2 s.c  o m-->
   border-collapse:collapse;
   width:501px;
}

td {
   border:2px solid Chartreuse;
}

.menu {
   text-align:center;
   width:81px;
}

.no-border {
   border:0;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td class="menu">Lorem i</td> 
     <td class="menu">Lorem ips</td> 
     <td class="menu">Lorem ipsum</td> 
     <td class="no-border"></td> 
    </tr> 
    <tr> 
     <td colspan="4">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam er</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials