Also known as a shorthand css property. See these threads for more info:

element.css("background") returns undefined
http://groups.google.com/group/jquery-en/browse_thread/thread/b1c863aa49ba185b

.css("border-color") returning undefined
http://groups.google.com/group/jquery-en/browse_thread/thread/9fdb1c44c2d9083f

Background-position related CSS properties issue
http://groups.google.com/group/jquery-dev/browse_thread/thread/6e9e0ba3486aebc6

Each time this has come up, some have wondered if jQuery couldn't/shouldn't
normalize this (since browsers seem to handle it differently), but no one
has volunteered.

- Richard

On Nov 16, 2007 4:47 PM, Dave Methvin <[EMAIL PROTECTED]> wrote:

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

Reply via email to