Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#5210 closed bug (duplicate)

css background-position in IE8 returns undefined

Reported by: valugi Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.3.2
Keywords: css, IE8 Cc:
Blocked by: Blocking:


el.css({ 'background-position': "10px 10px"}); set some alert(el.css("background-position")); get the value

In Opera, FF, Chrome, Safari works. Not in IE8.

Change History (5)

comment:2 Changed 14 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #4295. Use individual properties not shorthand ones.

comment:3 Changed 11 years ago by [email protected]

This is not a duplicate of #4295. That ticket deals with shorthand properties, but background-position is not a shorthand property according to the W3C. Some browsers treat it that way, providing the non-standard background-position-x and background-position-y; however, those are not a workable substitute, as Firefox does not support them. This is precisely the kind of inconsistency that jQuery ought to compensate for.

comment:4 Changed 11 years ago by [email protected]

Agree with @buchanans. Not sure why this issue still exists.

$(el).css('backgroundPosition') fails in <= IE8, instead returning undefined.

$(el).css('background-position-x') works in <= IE8, but then fails in other browsers.

comment:5 Changed 10 years ago by anonymous

The issue still exists

Note: See TracTickets for help on using tickets.