Search code examples
jquerycssimagecenterrollover

Swap image rollover center of site


For some reason I can't get something to work. All I want to do is to have an image in the center of a page (it's the only thing on the page) and when I rollover it it changes to a different image.

I am able to make the rollover effect with jquery and I am able to center a image on a page. But I can't combine them..Because the rollover effect with jquery is using an absolute position.

Please any help?

Thanks in advance!


Solution

  • You could try to wrap your image in a div and center that on the page with a position relative so your image would relate to that div instead of the document body.