I was wondering if in the width and height attributes, I could specify width and height as percentages?
Well, I guess that is obvious, because when I try so, it resizes, but it appears to skew the quality of my image.
Here is an example of my markup with fixed attributes:
<img src="#" width="346" height="413">
Now, while trying to scale this down, say by half, via percentages:
<img src="#" width="50%" height="50%">
I get something completely different than:
<img src="#" width="173" height="206.5">
I think I'm just fundamentally mistaking my percentage markup or something because there is a noticeable difference between my second and third example visually.
UPDATE: Hey thanks everyone for all of the helpful posts!
I really actually like the jQuery suggestion made by Pat just because with one snippet as he suggested, I can actually modify the selector and make it the apply to all of my fancybox affected images like-so:
$('img.FancyBox').each(function(){
$(this).width($(this).width() * 0.25);
});
How awesome is that!
You can check out the live effect here at my site: http://www.marioplanet.com/product.htm
It works pretty well, considering the fact that once I connect it to my SQL Server db then I can just apply that one jQuery snippet to all of the FancyBox class images on my product pages.
Thanks guys!