How to resize image in html using percentage as parametres?

Hard2Beat

New Member
I would like to resize an image on my website. I know how to do it by either resizing the image before or calculating the width and height and setting the values in pixels. But I use the same picture multiple times with different dimmensions, so it would take me less time if I could resize the image relatively to its own size.\[code\]<img src='http://stackoverflow.com/questions/12770021/images/logo-beta.png' id="logo" height="75%" width="75%"/>\[/code\]I have tried this, however the problem is that the size is set relatively to its parent element.
 
Back
Top