I want to have a one-pixel one-color solid border around a table and its cells. Adding
border="1" to the
table tag isn’t suitable, because it looks horrific in most of the browsers.
To make the CSS code easier to maintain, we can first set the border color for both table and td and then set the differing part separately. If you later want to change the border color, you only need to change it in one place.
Here is our final code:
/* <![CDATA[ */
border-width: 0 0 1px 1px;
border-width: 1px 1px 0 0;
/* ]]> */