Closed GoogleCodeExporter closed 9 years ago
Can you provide simple test case so I can add this to a test cases please ?
Thank you!
Original comment by wil...@gmail.com
on 10 Mar 2011 at 2:58
A part of one of my website:
HTML
<div style="position: relative; float:left;
display:inline;width:400px;height:400px">
<a class="photo1" href="image.jpg"><img alt="" class="cnv"
src="image_small.jpg" /></a>
</div>
CSS
.photo1
{width:200px;z-index:10;position:absolute;top:0px;left:0px;float:left;display:in
line;}
.photo1 img.cnv {width:100%;}
JQUERY
$('.photo1 img.cnv').rotate(8);
Original comment by daniele....@gmail.com
on 10 Mar 2011 at 3:05
Well using width:100% is not very safe as this might causing problems. Its
always better to rotate image with not changed width/height (this changes
aspect ratio of images and makes rotation harded). Is this still happening if
you remove that?
Thanks!
Original comment by wil...@gmail.com
on 10 Mar 2011 at 9:29
Yes.
I tried to remove { width:100% } from image, but the bug still remain.
In other cases I used { left:0; top:0; } to fix position absolute bug in IE,
because if you set a DIV with { position: absolute; } without "left" IE set the
top-left corner of the DIV in the middle of the container.
PS. Sorry for my bad english. I'm italian ;)
Original comment by daniele....@gmail.com
on 11 Mar 2011 at 7:14
Hi,
I tried to reproduce error but I cant. Here is what I have based on what you've
told me. Can you please check it and try to make it reproducable? Currently I
tested this on IE6/IE7/Chrome and got exactly the same results o_O
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script>
<script type='text/javascript' src='http://jqueryrotate.googlecode.com/files/jQueryRotate.2.0.js'></script>
<script type='text/javascript'>
$(document).ready(function()
{
$('.photo1 img.cnv').rotate(8);
});
</script>
<style type="text/css">
.photo1 {width:200px;z-index:10;position:absolute;top:0px;left:0px;float:left;display:inline;}
.photo1 img.cnv {width:100%;}
</style>
</head>
<body>
<div style="position: relative; float:left; display:inline;width:400px;height:400px">
<a class="photo1" href="image.jpg"><img alt="" class="cnv" src = 'http://4.bp.blogspot.com/_9a9gJG-E2Ig/SAsb-ijoBJI/AAAAAAAAAAk/OM7W_4sBAgk/s320/agatka.jpg'/></a>
</div>
</body>
</html>
Original comment by wil...@gmail.com
on 11 Mar 2011 at 8:59
Ok.
I've reproduced the bug.
The code:
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script>
<script type='text/javascript' src='http://jqueryrotate.googlecode.com/files/jQueryRotate.2.0.js'></script>
<script type='text/javascript'>
$(document).ready(function()
{
$('.photo1 img.cnv').rotate(8);
});
</script>
<style type="text/css">
.photo1 {width: 180px; z-index:10; position: absolute; top:20px; left:190px; float:left; display:inline; text-align: center; vertical-align: middle}
.photo1 img.cnv {width:100%;}
</style>
</head>
<body style="height: 614px; width: 990px; float:left; display:inline; position: relative;">
<div style="width: 415px; height:520px; overflow:hidden; margin: 25px 0 0 55px; padding: 0px; float:left; display:inline; text-align:left; position:relative;">
<a class="photo1" href="image.jpg"><img alt="" class="cnv" src = 'http://4.bp.blogspot.com/_9a9gJG-E2Ig/SAsb-ijoBJI/AAAAAAAAAAk/OM7W_4sBAgk/s320/agatka.jpg'/></a>
</div>
</body>
</html>
Solution: In my css i've insert { text-align:center; } and IE gives importance
to that instead of { position: absolute; }
LoL
Pardon ;)
Original comment by daniele....@gmail.com
on 11 Mar 2011 at 9:59
Original comment by wil...@gmail.com
on 28 Mar 2011 at 7:00
Original issue reported on code.google.com by
daniele....@gmail.com
on 10 Mar 2011 at 2:57