Attributes for <TABLE ...>
BORDERCOLOR = color expression
BORDERCOLORDARK = color expression
BORDERCOLORLIGHT = color expression

Usage Recommendation
use it, but don't rely on it

You may also want to check out our guide to table borders
BORDERCOLOR, BORDERCOLORLIGHT, and BORDERCOLORDARK set the colors of table borders. Netscape and MSIE both recognize BORDERCOLOR, but currently only MSIE recognizes BORDERCOLORLIGHT, and BORDERCOLORDARK.

BORDERCOLOR sets the color of all the borders for the table. So, for example, this code creates a table with red borders:

<TABLE BORDER=10 BORDERCOLOR=RED>

which gives us this table:

blah blah yeah yeah
whatever right on!

Note that none of these attributes work unless you set the border size with BORDER.

MSIE and Netscape render border colors quite differently. MSIE sets all the borders to the indicated color. Netscape gives the table a 3-D appearance by setting the left and top borders to a lighter shade than the bottom and right borders. Here's a comparison of the renderings:
Browser How The Table Appears
MSIEMSIE rendering of BORDERCOLOR=RED
Netscape Netscape's rendering of BORDERCOLOR=RED
MSIE allows you to individually set the light and dark borders with BORDERCOLORLIGHT, and BORDERCOLORDARK. For example, this code sets the light borders (top and left outside, bottom and right inside) borders to purple, and the dark borders (bottom and right outside, top and left insde) to green:

<TABLE BORDER=10 BORDERCOLORLIGHT=PURPLE BORDERCOLORDARK=GREEN>

which gives us this table:

blah blah yeah yeah
whatever right on!

If you use BORDERCOLORLIGHT, and BORDERCOLORDARK then MSIE ignores BORDERCOLOR. This behaviour allows you to set colors for browsers that only recognize BORDERCOLOR as well as those that recognize all three. So, for example, the following code sets a table with blue borders for those browsers that only recognize BORDERCOLOR, and sets the light borders to blue and the dark borders to a darker blue for those browsers that recognize BORDERCOLORLIGHT, and BORDERCOLOR.

<TABLE BORDER=10 
BORDERCOLOR=BLUE 
BORDERCOLORLIGHT=BLUE BORDERCOLORDARK=#000099>

which gives us

blah blah yeah yeah
whatever right on!

.





About the Author
Copyright 1997-2002 Idocs Inc. Content in this guide is offered freely to the public under the terms of the Open Content License and the Open Publication License. Contents may be redistributed or republished freely under these terms so long as credit to the original creator and contributors is maintained.