Javascript Reference
Categories: STYLE

javascript STYLE borderColor

@May 13, 2009, 8:38 a.m.
borderColor Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  



A shortcut attribute that lets you set multiple border edges to the same or different colors. You may supply one to four space-delimited color values. The number of values determines which sides receive the assigned colors.

document.getElementById("announce").style.borderColor = "red";
document.getElementById("announce").style.borderColor = "red green";
document.getElementById("announce").style.borderColor =
"black rgb(100, 75, 0) #c0c0c0";
document.getElementById("announce").style.borderColor = "yellow green blue red";

This property accepts one, two, three, or four color values as a string (including transparent as a color), depending on how many and which borders you want to set with specific colors.


The object's color property (if it is set).

Wow, this is really the thing I was looking for.
thanks guys!
Ashish - 2011-11-10
I can't complain. What i needed, when i needed it!
plr store - 2011-06-05
Thanks, this is what I was looking for. :)
Javascript Guy - 2010-04-29

Powered by Linode.