# how do i make a large image fit inside a small table cell...



## tjamnz (Jun 15, 2004)

without blowing up my page.

I have 6 cells 500 x 400 and im trying to import pictures of various sizes into these cells using html 4.

ive noticed that if i use the <img src=myfile.gif> tag , if the picture is wider.. it will widen the cell, and if its way larger.. my cell will explode to the images full size.

Is there a way to force the image to just take up the original cell space only, whether larger or smaller?

thanks,


----------



## knight_47 (Mar 15, 2006)

I think it would be best to just make a thumbnail the exact size you want it to be, and have that link to the full size image, this will also save bandwidth.


----------



## tjamnz (Jun 15, 2004)

what im really trying to do ... is find a script where one can click on the image and it will sort of emerge as an image somwhere around 300x400 in size, and where they can click on it again.. and it will shrink back down into the frame, but i figured a good place to start would be making the large images fit in the first place. Bandwidth isnt really an issue for me becuase I have a webhosting reseller account with an insane amount of disk space and bandwidth.


----------



## knight_47 (Mar 15, 2006)

do you mean something like this: http://www.knight47.com/funny.htm (click on a thumbnail)

if that's what you want, I used http://www.huddletogether.com/projects/lightbox2/


----------



## tjamnz (Jun 15, 2004)

yeah.. thanks for the huddle scripts. I'll check it out and let you know how it goes.


thanks.


----------



## Sequal7 (Apr 15, 2001)

Thats a nice script unless javascript is off, then it's just like autothumbnails.

Have you considered flash or an imaging script?


----------



## tjamnz (Jun 15, 2004)

i like flash , but wish i knew a bit more about imaging scripts


----------



## Sequal7 (Apr 15, 2001)

Imaging scripts are simply file uploaders (with a sessional login to protect the files) that are designed to store and publish images to a web server. Hotscripts has tons, I have one that I built that doesnt use a database, it is based off of minigallery. but it allows far more security and folder enhancements like choosing the image to display etc. You can upload via an admin pane in http too, so you can login to your gallery from anywhere, create folders, upload, delete, edit images and save them (no ftp and re-sorting required) and you can place great comments below the images.

Mine requires a php webserver, there is no database necessarry. I can provide you full priviledges as an admin to try it out if you want to, just PM me and I can give you a link to it. I can also help you install it on your own webserver if it allows php.


----------



## MMJ (Oct 15, 2006)

width="25px" height="25px"

I think thats how it is.


----------



## tjamnz (Jun 15, 2004)

MMJ said:


> width="25px" height="25px"
> 
> I think thats how it is.


this makes sense for the image properties. too bad when you size a cell, it doesnt automatically shrink a larger image to fit in to it lol


----------



## MMJ (Oct 15, 2006)

Well put it in the img props.


----------



## cwwozniak (Nov 29, 2005)

tjamnz said:


> too bad when you size a cell, it doesnt automatically shrink a larger image to fit in to it lol


As I believe MMJ may be suggesting, set the width in the IMG tags as a percentage. It has been a while since I have done it, but I believe that a browser will base the size of the displayed picture as a percentage of the containing cell width


----------



## tjamnz (Jun 15, 2004)

what a bear to learn... (im talkin mastery here) 

but thats really what it seems to be all about.


----------

