Friday, 6 July 2012

TABLE BORDERS


Table Borders

To specify table borders in CSS, use the border property.
The example below specifies a black border for table, th, and td elements:

Example

table, th, td
{
border: 1px solid black;
}

Notice that the table in the example above has double borders. This is because both the table and the th/td elements have separate borders.
To display a single border for the table, use the border-collapse property.

No comments:

Post a Comment