wilq32-pwitkowski / jqueryrotate

jQueryRotate - plugin to rotate images by any angle cross-browse with animation support
http://jqueryrotate.com
151 stars 58 forks source link

Centered image renders in wrong spot on IE6/7 #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a simple HTML page with a centered image (i.e. put it in a div with 
"text-align: center"
2. Apply rotation to the image
3. View the page in IE6/7

What is the expected output? What do you see instead?
Expected: The image rotates in-place
Instead: The image jumps to the right

What version of the product are you using? On what operating system?
IE6/7, Windows

Please provide any additional information below.
The following changes to jQueryRotate.2.1 fixed the issue for me:

      this._container.style.position="absolute";
      this._container.style.top = "0px"; // added
      this._container.style.left = "0px"; // added

Original issue reported on code.google.com by dcit...@gmail.com on 9 Apr 2011 at 9:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
As I remember the lines you've proposed breaks other case... I need to think a 
bit more about this.

Original comment by wil...@gmail.com on 4 Aug 2011 at 3:01

GoogleCodeExporter commented 9 years ago
This also fixes an issue in <= IE8 when the rotated element is 
position:absolute.
You have to set the CSS for the element to position:absolute !important as well 
as the js fix above.

Original comment by da...@bargecm.co.uk on 6 Jan 2012 at 3:51

GoogleCodeExporter commented 9 years ago
Integrated into code, thanks!

Original comment by wil...@gmail.com on 11 Jul 2013 at 2:41