Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Growing an Image on Hover & Keeping the Image Centered over original position Re: Growing an Image on Hover & Keeping the Image Centered over original position

#88709
nilsw
Member

Ok, so the previous example worked great with fixed size images, but what happens if all the images are different sizes?

I’ve converted the previous example to use varied image sizes, and JS to adjust for any image size and grow 10% in each direction. BUT, the problem, if the list items don’t have fixed sizes, then the grow effect moves everything around.

How can I keep things in one place with varying image sizes (& fixed height)?

http://jsfiddle.net/5hK3U/29/