I am using GSAP to show an image on hover that follows the cursor while moving around, it all works fine but I can't get the image to 'center center' the cursor, what am I missing here? Edit:
I accidentally updated the original codepen that had the wrong code, I don't have a back-up of the old -not working- version but if you are looking for the solution you can find it down below and read how we got there in the rest of the topic
Solution codepen:
See the Pen abWeQJa
@pixelarchitect
Just in case you are not aware: when you have a child with position absolute, the father needs to have position relative or fixed, otherwise the child will position itself in relation with the first father it finds with the needed positions or with the body, like in this case. Also, when you have an element with position absolute you need to set its top and left as 0 in order to force those x/y coordinates on the browser.
On the other hand, now your coordinates