Javascript Reference
Categories: TR

javascript TR borderColorDark, borderColorLight

@July 12, 2008, 4:53 a.m.
borderColorDark, borderColorLight Firefox/Netscape/NN n/a IE 4 Chrome/Safari/DOM n/a  
  Read/Write  

The 3-D effect of TR borders in Internet Explorer is created by careful positioning of light and dark lines around the page's background or default color. You can independently control the colors used for the dark and light lines by assigning values to the borderColorDark (left and top edges of the cell) and borderColorLight (right and bottom edges) properties.

 

Typically, you should assign complementary colors to the pair of properties. There is also no rule that says you must assign a dark color to borderColorDark. The attributes merely control a well-defined set of lines so you can predict which lines of the border change with each attribute.

 
Example
 
document.getElementById("myTR").borderColorDark = "blue";
document.getElementById("myTR").borderColorLight = "cornflowerblue";
 
Value

A hexadecimal triplet or plain-language color name. A setting of empty is interpreted as "#000000" (black). See Appendix A for acceptable plain-language color names.

 
Default

Varies with operating system.


Powered by Linode.