HTML/CSS/CSS Attributes and Javascript Style Properties/border collapse

Материал из Web эксперт
Перейти к: навигация, поиск

"border-collapse" Example

   <source lang="html4strict">
   

<html> <body>

column 1 column 2 column 3
cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

<button onclick="myTable.style.borderCollapse="separate"">separate</button> <button onclick="myTable.style.borderCollapse="collapse"">collapse</button> </body> </html>


     </source>
   
  


border-collapse: separate

   <source lang="html4strict">

<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head>

 <title>CSS Example</title>
 <style rel="stylesheet" type="text/css">

table {

 background-color: #efefef;
 width: 350px;
 border-collapse: separate;
 empty-cells: hide;

} td {

 padding: 5px;
 border-style: solid;
 border-width: 1px;
 border-color: #999999;

} </style> </head> <body>

Title one Title two
Row Title value value
Row Title value

</body> </html>

</source>