Skip to main content

Bug Tracker

Side navigation

#8949 closed bug (worksforme)

Opened April 23, 2011 09:37AM UTC

Closed February 22, 2012 12:54AM UTC

Last modified March 09, 2012 01:43PM UTC

.width() and .height() with css atrrbute clip in opera

Reported by: Owned by:
Priority: low Milestone:
Component: css Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

I believe that the newest Opera version returns as value for .width() and .height() of an image only the width and height of the clip attribute when it is set in css. In Firefox and Internet Explorer the width and height of the complete image is returned.

If I use .attr('width') and .attr('height') the correct values of the whole image are returned in all browsers.

Attachments (0)
Change History (4)

Changed April 23, 2011 10:27AM UTC by addyosmani comment:1

component: unfiledmanipulation
owner: →
priority: undecidedlow
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on that reproduces the issue experienced to help us assess your ticket!

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

Changed April 23, 2011 12:08PM UTC by comment:2

status: pendingnew

I have tried to reproduce my problem at

As you can see the .height() function returns different values on IE, FF and Opera.

Changed April 23, 2011 03:56PM UTC by timmywil comment:3

component: manipulationcss
status: newopen

Confirmed inconsistent values are returned. Updated test case

Changed February 22, 2012 12:54AM UTC by mikesherov comment:4

resolution: → worksforme
status: openclosed

I can no longer reproduce this using timmywil's fiddle as of today. I tested this in IE8, Opera 11.6, FF10, Chrome 17. All produce the value of 400 for height.

Until there is a new repro case, I'm considering this closed.