View Full Version : Resizing Images in picture Galleries
steelstickshell
05-24-2002, 02:03 PM
Hello. I'm making a picture gallery with one frame that holds the thumbnails and a larger frame where the images load if you click on the thubmnails. I need to make it such that the image in the larger frame is displayed full-size if the browser width is large enough, and if not I want the image resized to fit the frame.
Anyone?
kevin
05-24-2002, 02:41 PM
hmmm....sounds like you will need to use a javascript that detects the window size and make the width=xx atrribute of the img tag a variable that the script fills in after detecting the window size. I will transfer this thread to client side and see if they can help you out :)
Jon Hanlon
05-26-2002, 09:57 PM
These's a body.clientWidth, and Netscape has a width property, but I'd just use <img width="100%" ...>
jonirvine
06-06-2002, 06:15 PM
<img width="100%" ...>
Can you do that? Learn something new everyday!
Jon
Ben Rowe
06-07-2002, 02:03 AM
just use <img src="file" border="0">
dont worry about width/height, the browser will auto figure it out
steelstickshell
06-07-2002, 08:39 AM
what i wanted was something like what windows xp does with picture folders... see for yourself: click view filmstrip on a picture folder and see, on the preview pane, large pictures are downsized but small pictures remain the same size. and if you resize the window the dimensions of the preview picture also changes dynamically.
scoutt
06-07-2002, 09:20 AM
now you are talking about 2 different things. on eis an OS which has more control over the image and the other is a browser which as limited control.
the only problem I see with resizing it to the users browser size is if the user has a small browser window (small monitor, and yes they are still out there) that it will squish the image and make it look all distorted and everything.
beside in IE the content bar will make it smaller for you.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.