PDA

View Full Version : Image zoom in/out script & min.image height?


lost_mystic
09-30-2002, 06:37 PM
I downloaded the Image zoom in/out script from JavaScript Kit at http://www.javascriptkit.com/script/script2/imagezoom.shtml.

I like to test everything as I'm writing my page to avoid problems. Everything works fine with the script except on one image. The image size is 150x14. When I hover my mouse over the zoom in, the width expands like it is suppose to, but the height remains static. The only way I can get the image height to expand is to change the 14 to at least 20, which causes a distortion of the image.

This isn't a major problem just a bit annoying. Is there a better way to fix the problem?



Lost Mystic

Garadon
09-30-2002, 08:47 PM
note this is only a theory to why it not work with 14

when u enlarge 14 with 5% u get 14.7 but since u can't put
a decimal number as a pixel value for ur image it places 14
so it will keep enlarging 14 with 5%

but when u enlarge 20 with 5% u get 21

lost_mystic
09-30-2002, 09:33 PM
Didn't think about that.

Thanks for the reminder.

Guess I'll stick with the distortion.

Lost Mystic