How can I have a png image file appear smmaller then its size?

Hi, I'm just using html and jQuery for this.  I have a few images in png file.  It's made 4 times the size then I actually need because the person who make them think it would look better when it's sized to med and large size in the program.  How do I make it look about 25% of its original size?  In img tag?  Thanks
lapuccaAsked:
Who is Participating?
 
VampireofdarknessConnect With a Mentor Commented:
Get the dimensions of the image (ie- 600 x 400), divide those by 4.

<img src='image.png' width='150' height='100' />
0
 
Gurvinder Pal SinghCommented:
did you tried giving specific height and width to that img?

<img src="" height="100px" width="100px"/>
0
 
VampireofdarknessCommented:
Failing that, if you MUST use jQuery, you could use something like

HTML: <img src='image.png' id='myimage' />

JS:
$(document).ready(function() {
  $('#myimage').css('height':($(this).height()*0.25),'width':($(this).width()*0.25));
});

Untested, but should work.
0
 
lapuccaAuthor Commented:
Thank you.
0
All Courses

From novice to tech pro — start learning today.