image moves on hover - chrome opacity issue
Another solution would be to use
-webkit-backface-visibility: hidden;
on the hover element that has the opacity. Backface-visibility relates to transform
, so @Beskow's has got something to do with it. Since it is a webkit specific problem you only need to specify the backface-visibility for webkit. There are other vendor prefixes.
See http://css-tricks.com/almanac/properties/b/backface-visibility/ for more info.
For some reason Chrome interprets the position of elements without an opacity of 1 in a different way. If you apply the CSS attribute position:relative
to your a.img elements there will be no more left/right movement as their opacity varies.
I had the same problem, I fixed it with css transform rotate.Like this:
-webkit-transform: rotate(0);-moz-transform: rotate(0);transform: rotate(0);
It works fine in major browsers.