Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding image to fixed size container without changing the dimensions
    primarykey
    data
    text
    <p>I have a fixed container (200x200px) where I want my images to be loaded. Each image has different sizes and currently I have to either resize the image to the container width or the image looses its proportions.</p> <p>How can I add a image (not background image) to a container and also show the image without changing its proportions possibly in the center (so if the image is 800x600) it will show the center middle 200x200 of that same image? I don't mind using either PHP or jQuery or some CSS magic to make this work.</p> <p>I really have no idea how to even start so I hope someone can assist with the procedures or stepping stones as how to do this?</p> <p><em><strong></em> EDIT **</strong></p> <p>I'm possibly not explaining properly. All of the images are bigger than the 200x200 area allocated to it, the problem with resizing is that once the user clicks on the image it needs to load the same image in a lightbox with the key difference that it loads the same image. So effectively I want to force a "thumbnail" view without hindering the proportions of the image. As some of the images are horizontal and some vertical I figured I would rather show the "center" or whichever corner of the image with 200x200 and have the user click on the image to view the full picture. What I am looking for is a way to almost make the image "act" the same way a background image would, but not be a background image? Does that makes sense and is there something available which can assist? </p> <p>** SAMPLE IMAGE ** Here is a sample image to illustrate my idea: <a href="http://tinypic.com/view.php?pic=21caxc1&amp;s=6" rel="nofollow">http://tinypic.com/view.php?pic=21caxc1&amp;s=6</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload