resizing pictures

06-27-2002, 11:33 PM
how do i resize a picture by reducing/increasing it by percentages? like size="50%" would shink the pic to half its size. how do i do that?

06-27-2002, 11:41 PM
<img HEIGHT="50%" WIDTH="50%" SRC=...>

06-27-2002, 11:51 PM
ok, i tried the code and it didnt work. he is what i did...

<img width="50%" height="50%" src="logo1.JPG" border="0" class="shakeimage" onMouseover="init(this);rattleimage()" onMouseout="stoprattle(this)">

06-28-2002, 12:02 AM
I assumed it would use the percentage of the actual image size,
but it actually does a percentage of the space available for the
image. If you stuck it in a cell of a table that was sized smaller,
it would scale to the size of the cell. Sorry.

06-28-2002, 12:04 AM
Also, do you have width/hieght in your class. (shakeimage)

06-28-2002, 12:08 AM
so what do i have to do?

06-28-2002, 12:14 AM
I would go with Thinkers' suggestion, Place your image in a cell/table and resize the cell.

I was just curious to know if your 'shakeimage' class contained any width or hieght.

06-28-2002, 09:47 AM
no, it doesnt

Derek Stone
06-28-2002, 04:02 PM
Take the actual width and height of the image, divide by two, and use those numbers in the width and height properties of the IMG tag.


07-11-2002, 08:14 PM
If you're interested, here ('s a tutorial I created and posted in the Tutor's corner. It deals with the dynamic resizing of images with VBScript (ASP.)

It may be more than you care to know... but, then again, it may not.

07-12-2002, 08:44 AM
It looks like a good example. Code is well documented but there
isn't any real tutorial included so I moved it to the Code Library.

07-12-2002, 04:50 PM
You're right Thinker. I should have posted it there originally.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum