Forums

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

Home Forums CSS Propotional resize

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #38025
    XaviJr
    Participant

    http://jsfiddle.net/pzFKD/

    I want to resize the images so they occupy all the 170px and show the most of the image. Is it possible just with css?

    #102706
    Brightonmike
    Member

    Um, width 100%? No?

    #102707
    XaviJr
    Participant

    no, there is the problem if the image with more height that width..

    #102709
    XaviJr
    Participant

    I tried with width:100% and still not working..

    http://jsfiddle.net/pzFKD/3/

    #102710
    Anonymous
    Inactive

    You need JavaScript if you want to do that. You want to variably resize the image based on the original dimensions. To do that, I am pretty sure you’ll need the object model that JS provides.

    #102713
    Paulie_D
    Member

    You can’t have it both ways, either they scale to the width or the height.

    Simple answer, size your images appropriately before using.

    #102715
    XaviJr
    Participant

    thank you for the answers, I really want to give liberty to my client so I’ll use javascript.

    #102726
    TheDoc
    Member

    Assuming that they will all be bigger than 170×170 you could put it on the background: http://jsfiddle.net/pzFKD/4/

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