'table-layout' Example : table layout « CSS Attributes and Javascript Style Properties « HTML CSS Reference






'table-layout' Example

    
<html>
<body>
<table style="table-layout:fixed" width="400" border>
   <col width="150">
   <col width="300">
   <col width="200">
   <thead height="20">
   <tr>
      <th>150px wide column</th>
      <th>300px wide column</th>
      <th>200px wide column</th>
   </tr>
   </thead>
   <tr height="20"> 
      <td>Cell 1 content</td>
      <td>Cell 2 content</td>
      <td>Cell 3 content</td>
   </tr>
</table>

<table style="table-layout:auto" width="400" border>
   <col width="150">
   <col width="300">
   <col width="200">
   <thead height="20">
   <tr>
      <th>150px wide column</th>
      <th>300px wide column</th>
      <th>200px wide column</th>
   </tr>
   </thead>
   <tr height="20"> 
      <td>Cell 1 content</td>
      <td>Cell 2 content</td>
      <td>Cell 3 content</td>
   </tr>
</table>

</body>
</html>

    
      
      








Related examples in the same category

1.'table-layout' Syntax and Note
2.'table-layout' Possible Values
3.'table-layout' is applied to