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

Home
HTML CSS Reference
1.CSS Attributes and Javascript Style Properties
2.HTML Attributes Reference
3.HTML Tag Reference
HTML CSS Reference » CSS Attributes and Javascript Style Properties » table layout 
'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 content</td>
      <td>Cell content</td>
      <td>Cell 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 content</td>
      <td>Cell content</td>
      <td>Cell 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
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.