Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS cropping images with CSS

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25380
    dodgson
    Member

    Hey guys and Gals. I was wondering if anyone new of a way to crop or clip images to a specified size (ie. 100px x 100px). I have images that are being loaded from a database (this is supposed to be a photo gallery). Some images are 100px 150px but I really want the thumbnails to be the same size. Is this possible? I know there are ways to clip background images, but these images will be added dynamically and I don’t want to have distorted thumbnails.

    Thanks for help/advice.
    Mark

    #60395
    frufry
    Member

    You could wrap the images in container elements (DIV, LI, etc), set a fixed height and width, and then set overflow:hidden.

    #60396
    apostrophe
    Participant

    PHP is your best option http://phpthumb.sourceforge.net/

    #60402
    dodgson
    Member

    thanks for your help. I will be giving both a try. Keep you posted.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.