Jago6060 Posted July 28, 2007 Share Posted July 28, 2007 my code is set so I can enlarge the images but they don't retain their original proportions. Anyone know how I can keep the image proportions? heres my function... <script language="JavaScript"> function imgEnlarge(obj){ obj.height += 150; obj.width += 150; } function imgShrink(obj){ obj.height -= 150; obj.width -= 150; } </script> Link to comment https://forums.phpfreaks.com/topic/62122-image-rollover-problems/ Share on other sites More sharing options...
mainewoods Posted July 28, 2007 Share Posted July 28, 2007 try just setting the height and set the width to blank(it works in html): function imgEnlarge(obj){ obj.width = ''; obj.height += 150; } function imgShrink(obj){ obj.width = ''; obj.height -= 150; } Link to comment https://forums.phpfreaks.com/topic/62122-image-rollover-problems/#findComment-309820 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.