> I want to get the border-color of a div. The border-color property is most useful for setting all the border sides at once. When getting the colors it's more complicated. Which side of the div do you want to examine: top, right, bottom, or left? Each can be a different color. If they were different colors, what would you want border-color to return--and would all the browsers meet your expectation?
If you know for sure that all the sides are the same color, just pick a side; you could use border-left-color. However, I'm not sure all browsers return a valid result unless border-left-style is something other than 'none' so you may need to check for that first if you're not sure the element has a border. I know that Opera used to return width -1 for borders that had style set to 'none', which was a pain.