kraftwerk
06-27-2002, 10: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?
resizing pictureskraftwerk 06-27-2002, 10: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? Thinker 06-27-2002, 10:41 PM <img HEIGHT="50%" WIDTH="50%" SRC=...> kraftwerk 06-27-2002, 10: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)"> Thinker 06-27-2002, 11:02 PM 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. Robby 06-27-2002, 11:04 PM Also, do you have width/hieght in your class. (shakeimage) kraftwerk 06-27-2002, 11:08 PM so what do i have to do? Robby 06-27-2002, 11:14 PM 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. kraftwerk 06-28-2002, 08:47 AM no, it doesnt Derek Stone 06-28-2002, 03: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. -CL Rezner 07-11-2002, 07:14 PM If you're interested, here (http://www.visualbasicforum.com/showthread.php?postid=158338#post158338)'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. Thinker 07-12-2002, 07: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. Rezner 07-12-2002, 03:50 PM You're right Thinker. I should have posted it there originally. |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum