Fixed table td width in hidden div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Table

Description

Fixed table td width in hidden div

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 {<!-- w w w .j  ava2 s .  co  m-->
   border:2px solid Chartreuse;
   table-layout:fixed;
   width:801px;
   border-collapse:collapse;
}

.table td {
   padding:3px 0 3px 3px;
   border:2px solid yellow;
}

.table td:first-child {
   width:291px;
}
</style> 
 </head> 
 <body> 
  <div class="content"> 
   <table class="table"> 
    <tbody> 
     <tr> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
     </tr> 
     <tr> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
     </tr> 
     <tr> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
      <td>Lorem ipsum</td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials