Friday, 15 August 2014

jquery - Adding image to fixed size container without changing the dimensions -



jquery - Adding image to fixed size container without changing the dimensions -

i have fixed container (200x200px) want images loaded. each image has different sizes , have either resize image container width or image looses proportions.

how can add together image (not background image) container , show image without changing proportions perchance in center (so if image 800x600) show center middle 200x200 of same image? don't mind using either php or jquery or css magic create work.

i have no thought how start hope can assist procedures or stepping stones how this?

edit **

i'm perchance not explaining properly. of images bigger 200x200 area allocated it, problem resizing 1 time user clicks on image needs load same image in lightbox key difference loads same image. want forcefulness "thumbnail" view without hindering proportions of image. of images horizontal , vertical figured rather show "center" or whichever corner of image 200x200 , have user click on image view total picture. looking way create image "act" same way background image would, not background image? makes sense , there available can assist?

** sample image ** here sample image illustrate idea: http://tinypic.com/view.php?pic=21caxc1&s=6

or seek css based solution. give class attribute images .resizedimg{width:90%}. 90% relative container width not original image width.

if not help create jquery. here tool create job good: http://imgscale.kjmeath.com/

jquery html css

No comments:

Post a Comment