...

View Full Version : Limiting sizes in div's



HIPPY
07-10-2007, 02:16 PM
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

I intend on using this gallery viewer on my site.

Is it possible to make it so that image that is displayed in the div is limited to certain dimensions.. say 100 by 100px. If an image that is displayed is above the limit, the excess is simply just out of view..

I dunno how this would be possible maybe by a use of some sort of mask, i normally code inflash im not sure if taht is possible with divs in html. Or maybe you can limit the size in the js file, if your allowed to.

Any help will be much appreciated thank you

(If your wondering why dont I just use images that are less than 100x100px, it is because, other people will be able to save their imageshack or photobucket links ot the site and using perl be able to display it in the gallery, the size limit needs to be inhibited somehow)

rwedge
07-11-2007, 02:23 AM
In the javascript you could add a width of 100 to the image tag, though it is generally not a good way to resize an image
var imageHTML='<img src="'+imagepath+'" width="100" style="border-width: 0" />'



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum