View Full Version : Rollover Image Proportion

01-11-2010, 03:48 PM
I have a thumbnail 95x95 and the rollover image 250x145 to be displayed in a 300x300 table, when i want to display a rollover image in a different box it stretches the image to be wider so it looses it's proportion, is there a way to prevent the rollover image from changing size so it keeps it's proportion ? I am using DW8.02

01-11-2010, 03:53 PM
Have you got this online anywhere? I'm having trouble understanding your question.

01-11-2010, 03:59 PM
If you can upload somewhere to the web and provide a link, that would be optimal.

01-11-2010, 04:00 PM

If you look at the thumbnails for the wall plate and scroll over it you will notice that the large image will be out of proportion.

01-11-2010, 04:11 PM
OK, I see now. Are you using the same image for the thumbnail as the rollover?

01-11-2010, 04:21 PM
The thumbnail is http://www.execulink.com/~wilstv/Auctions/4p4c/tn1portplate.gif

And the rollover is http://www.execulink.com/~wilstv/Auctions/4p4c/1portplate.gif

01-11-2010, 04:29 PM
OK, the image is resizing to fit the table it is in. Try specifying the correct height and width for the image in your code.

01-11-2010, 04:53 PM
Thanks Corrosive
I've tried to enter width="140" height="224" into the code to just affect the larger rollover image for that one but all i can achieve is to make the thumbnail bigger LOL I guess i may have to live with it.

01-11-2010, 04:57 PM
Yeah, that would affect the thumbnail but where you have the javascript code for the swapped image would it not let you manually add the width and height there? So when it gets called it has the correct proportions.

01-11-2010, 06:36 PM
Dreamweaver's swap image behavior always resizes the new image to the same dimensions as the one it replaces. To do what you want, you'll need another script. Or you can simply add some white space to the wall plate image so that it is the same size as the original image.