Side navigation
#5210 closed bug (duplicate)
Opened September 14, 2009 10:57AM UTC
Closed September 24, 2009 03:32AM UTC
Last modified March 05, 2013 06:01PM UTC
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: |
Description
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.
Attachments (0)
Change History (5)
Changed September 14, 2009 11:54AM UTC by comment:1
Changed September 24, 2009 03:32AM UTC by comment:2
resolution: | → duplicate |
---|---|
status: | new → closed |
Duplicate of #4295. Use individual properties not shorthand ones.
Changed December 07, 2011 05:27PM UTC by comment:3
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.
Changed December 14, 2011 05:11AM UTC by comment:4
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.
Changed March 05, 2013 06:01PM UTC by comment:5
The issue still exists
This is what I did as a workaround. http://stackoverflow.com/questions/1420913/jquery-css-bug-in-ie8