I made a button for my website which is a div
with a background image. I animated that button using jQuery, so that when the mouse hovers the button, it jumps 20px to the right and when the mouse leaves, it goes back to previous location.
Problem is, when I zoom in (ctrl + scroll), the whole animation becomes a mess. The button moves rapidly left to right, and of course not where it supposed to be.
I used relative
position and pixel unit to position the elements.
How should I position things? absolute
or relative
? Pixel or percent?