Leave browser to calculate column width - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Column

Description

Leave browser to calculate 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, th, td {
   border:2px solid Chartreuse;
   border-collapse:collapse;
}

th, td {
   padding:6px;
}
</style> <!--from  w  ww  . j av a 2s.  c om-->
 </head> 
 <body> 
  <table> 
   <caption style="background: lightgreen;">
     Lorem ips 
   </caption> 
   <thead> 
    <tr> 
     <th>Lorem i</th> 
     <th>Lorem ipsum d</th> 
     <th>Lorem ipsum d</th> 
     <th>Lorem ipsum d</th> 
     <th>Lorem ips</th> 
     <th>Lorem ips</th> 
     <th>Lorem ips</th> 
     <th>Lorem ips</th> 
     <th> &nbsp; </th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td>Lorem ipsum dolor sit amet, </td> 
     <td> <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tor</span> </td> 
     <td>Lor</td> 
     <td>Lor</td> 
     <td>Lor</td> 
     <td>Lor</td> 
     <td>Lor</td> 
     <td>Lor</td> 
     <td>Lor</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials