'border-collapse' Example : border collapse « CSS « HTML / CSS

HTML / CSS » CSS » border collapse 
'border-collapse' Example
 
    
<html>
<body>
<table id="myTable" border="1" style="border-collapse:collapse">
<tr>
   <td>column 1</td>
   <td>column 2</td>
   <td>column 3</td>
</tr>
<tr>
   <td>cell 1</td>
   <td>cell 2</td>
   <td>cell 3</td>
</tr>
<tr>
   <td>cell 1</td>
   <td>cell 2</td>
   <td>cell 3</td>
</tr>
</table>
<button onclick="myTable.style.borderCollapse='separate'">separate</button>
<button onclick="myTable.style.borderCollapse='collapse'">collapse</button>
</body>
</html>

    
      
        
  
Related examples in the same category
1.border-collapse: separate
2.border-collapse:separate
3.border-collapse:collapse
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.