Picture resize still not working!

B

Brett

Please see post below

It could be done "supposedly" using a script
that detects browser resolution and then "rewrites"
the width and height attributes ( which are set as
variables )
for the image.

Also, I tinkered with this a while back, by placing an
image
in a table cell set at 80% width, inserting the image and
then
changing the image width and height to 100%
I have no clue as to whether it will work on other
browsers,
but what I was playing with is here:
http://www.95isalive.com/test/

Open it and then change your monitor resolution settings
and see how it works.
Use View source to see how it was done.
Also, I would recommend using a larger image
and forcing it smaller as doing it the other way
around will make it "pixelated" and then E.T.
will give me the dickens.
( sorry E.T., couldn't resist ) ;-)
--
95isaliv


I have set the table properties to 80% for both the width
and height. I then inserted my picture and set the width
and height to 100%.

The results are a picture that is wide but very short. I
have tried to check...recheck and check for the 20th time
but can not see the problem. I have updated my site with
the results picture in question is on the homepage in
main frame. any suggestions would help!
www.earthworks-landscape.com

Brett
 
M

MD WebsUnlimited.com

Brett,

Please don't create new thread but continue the existing one.

You'll need to do something like in this example:

function zoom(width,oImg) {
var aspect = aspectRatio(oImg);
var iHeight = width / aspect;
oImg.width = width;
oImg.height = iHeight;
}
function aspectRatio(oImg) {
if( typeof(oImg) != 'undefined') {
var argv = aspectRatio.arguments;
var argc = argv.length;
if(argc > 1) var sWhich = argv[1]; else sWhich = 'w';
sWhich == 'w' ? aspect = oImg.width / oImg.height : aspect = Img.height /
oImg.width;
return aspect;
}
}
</script>

<body onload="zoom(screen.width,myImg)" >

Where myImg is the image on the page to be size to the screen.
 
Top