13 Responses

  1. Keiko
    February 6, 2012 at 8:39 am |

    Thanks for the tiaorutl! I’m almost there, but for some reason my images open up in a new window, and do not replace the other image. Please help! Thanks!

  2. Dani
    April 16, 2012 at 12:06 am |

    THANK YOU. I was looking for something clean and simple for a photo gallery and this is it! Thank you so much!

  3. Rob
    June 13, 2012 at 3:07 pm |

    You da man!

  4. Mike
    August 19, 2012 at 11:29 am |

    Thank you so, so much! Such an easy and elegant fix for something that has been driving me mad for the last 4 hours!

    Honestly, people, like yourself who post things like this, really are exceptionally wonderful human beings! :)

  5. Arun Thota
    September 6, 2012 at 2:28 am |

    Excellent technique!

  6. Artemisia Moltabocca (@moltabocca)
    November 4, 2012 at 1:04 pm |

    Haha! Yes! I have a gallery of images that includes horizontal and vertical images. I wanted a way to crop down the horizontal ones down to a consistent size without having to fire up Photoshop. Now I can delete that annoying “Gallery Images” album. I can now crop the actual image. Thanks so much! *happydance*
    http://costumingdiary.blogspot.com/p/costuming-tutorials.html

  7. Queenie
    December 30, 2012 at 9:24 pm |

    Thanks so much.
    This is what i was looking for! :)

  8. Hemali
    January 28, 2013 at 12:18 am |

    It Crop image from bottom side. i need to crop image from the top and bottom any idea..?

  9. John
    February 19, 2013 at 2:07 pm |

    Helpful post. Thanks Bryan!

  10. Paul
    February 26, 2013 at 12:50 am |

    Thanks this was a great tip and I used on a site to do exactly that, now the image stays in the box even though it’s bigger than the box size – perfect!

  11. Timbo
    February 28, 2013 at 8:31 pm |

    Awesome, just what I needed. Though like Hemali, I would like to crop the top off too.

    I not an expert, but this seemed to work:

    .container img { width: 100%; position: relative; top: -15px;}

    The above appears to crop the top 15px off the image.

    -Timbo

Leave a Reply