Actually "background" is the "shorthand" property, "backgroundPostion" is the "fully qualified" property.
There is/was a bug in Firefox: Bug 316981 – background-position property is not available through the CSS DOM interface https://bugzilla.mozilla.org/show_bug.cgi?id=316981 Karl Rudd On Nov 28, 2007 9:25 AM, Richard D. Worth <[EMAIL PROTECTED]> wrote: > This is what css calls a shorthand property. It's used for setting. Browsers > differ in their treatment of it as a getter. jQuery doesn't (yet) normalize > this. 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 > > - Richard > > On Nov 27, 2007 4:40 PM, Karl Swedberg <[EMAIL PROTECTED] > wrote: > > > > Weird. That must be a bug. You can set the background position... > > $('.XXX').css('backgroundPosition', '0 50%'); > > and then get it ... > > $('.XXX').css('backgroundPosition'); > > // returns "0pt 50%" > > but you can't get it without setting first. > > > > Hmmm. > > > > --Karl > > _________________ > > Karl Swedberg > > www.englishrules.com > > www.learningjquery.com > > > > > > > > > > > > > > On Nov 27, 2007, at 2:13 PM, DaveG wrote: > > > > > > > > How do I get the background-position? > > > > > > $('.XXX').css("background_position"); > > > $('.XXX').css("background-position"); > > > $('.XXX').css("backgroundPosition"); > > > > > > ...do not work. Other variants like "background-color" work fine. > > > > > > > > > ~ ~ David > > > > > >