CSS Tables
CSS Attributes for Styling Tables
| Property | Description | Values |
|---|---|---|
| border-collapse | Determines whether adjoining borders merge (collapse) or appear seperated (seperate) | collapse separate |
| border-spacing | Sets the distance that separates cell borders (only for the "separated borders" model) | length length |
| caption-side | Sets the position of the table caption | top bottom left right |
| empty-cells | Sets whether or not to show empty cells in a table (only for the "separated borders" model) | show hide |
| table-layout | Sets the algorithm used to display the table cells, rows, and columns | auto fixed |
Use border properties to set table borders. A simple table styling example:
#content table {
border-collapse:collapse;
width: 77%;
}
#content th {
background:#8C4504 none repeat scroll 0 0;
border:2px solid #FFFFFF;
padding:3px;
}
#content td {
background:#C88000 none repeat scroll 0 0;
border:2px solid #FFFFFF;
padding:3px;
}
