Border Color and Backgrounds

Internet Explorer accepts a number of additional attributes to its table tags. These attributes let you set images for the backgrounds and border colors of table elements. They can set values for the whole table, individual rows, and individual cells. Values can be set in a nested fashion, so that a specification for a single cell can override the broader setting for its row or the whole table.

Each attribute accepts a value specified as either an RGB color value or a standard color name, both of which are described in Chapter 8.

The background attribute allows you to set a background image for the entire table or individual cells. The image is tiled behind the appropriate table element automatically. The value of the background attribute is the URL of the image file.

Borders in Netscape and Internet Explorer create a 3D effect by using three differently colored strips. There is a thick center strip with much thinner strips on each side. One of the outer strips is colored darker than the center strip, and one is lighter, producing a shadowed effect. Internet Explorer allows you to set the colors for each of these elements when you have borders turned on with the border attribute in the <table> tag.

The bordercolor attribute sets the color of the main center strip of a border. The bordercolorlight attribute sets the color of the light strip of a border, the top- or left-most strip. bordercolordark sets the color of the dark strip, the bottom or right-most ...

Get Webmaster in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.