PDA

View Full Version : Rollover Image Proportion


windsurfer
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

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

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

windsurfer
01-11-2010, 04:00 PM
http://www.execulink.com/~wilstv/Auctions/4p4c/4p4c.html

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.
Thanks

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

windsurfer
01-11-2010, 04:21 PM
No
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

Corrosive
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.

windsurfer
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.

Corrosive
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.

DWcourse
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.