Javascript Reference
Categories: STYLE

javascript STYLE borderBottomColor, borderLeftColor, borderRightColor, borderTopColor

@Aug. 17, 2009, 8:35 a.m.
borderBottomColor, borderLeftColor, borderRightColor, borderTopColor Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

 

Read/Write  

Provide the color of a single border edge of an element. It is easy to abuse these properties by mixing colors that don't belong together. See also the borderColor attribute for setting the color for groups of edges in one statement.

 
Example
 
document.getElementById("announce").style.borderBottomColor = "red";
document.getElementById("announce").style.borderLeftColor = "#20ff00";
document.getElementById("announce").style.borderRightColor = "rgb(100, 75, 0)";
document.getElementById("announce").style.borderTopColor = "rgb(90%, 0%, 25%)";
 
Value

For details on CSS color values, see the section about colors.

 
Default

None.


Powered by Linode.