home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeWebmaster in a Nutshell, 3rd EditionSearch this book

5.5. Border Color and Backgrounds

Previous versions of Internet Explorer introduced a number of additional attributes to its table tags that 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 recommended method for setting backgrounds is to define style attributes for table elements. See Chapter 9.

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 strip.

You needn't specify all three border colors. The default for Internet Explorer's table borders sets the lighter and darker strips about 25% brighter and darker than the main border color.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.