Scale image to fit.

Discussion in 'CSS' started by natkay2603, Apr 18, 2011.

  1. #1
    Hi all,

    I have a problem with a wordpress template.

    I am having trouble figuring out how to set my images to scale to fit.

    It is difficult to explain exactly what I mean, but if you look at this page you will see the problem. http://www.geeksphere.co.uk/category/review/

    If some one could point me in the right direction to resolving this issue I would be most greatful!
     
    natkay2603, Apr 18, 2011 IP
  2. ayekaye01

    ayekaye01 Peon

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    check your style.css file, look for the size of the thumbnail.
     
    ayekaye01, Apr 18, 2011 IP
  3. natkay2603

    natkay2603 Peon

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, Possible I have put this in the wrong forum in error.

    Think this is controlled in the "index.php" by the below section, with the help of firebug.

    I just don't know what to modify to scale the image to fit the 140px by 110px box. Ideally I don't want to lose the ratio.

    Any help, please?
     
    natkay2603, Apr 19, 2011 IP
  4. rahulparekh

    rahulparekh Member

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #4
    Resize and upload the images with 140px width and 110px height to fit the div, mate.
     
    rahulparekh, Apr 19, 2011 IP
  5. natkay2603

    natkay2603 Peon

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for the reply.

    The problem is I don't want the image in the post to be that small.

    Hence, why I want it to scale in this box.
     
    natkay2603, Apr 19, 2011 IP
  6. ayekaye01

    ayekaye01 Peon

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i think its the margin, you want your thumbnail aligned with the title of your article, right?..specifically the top margin.
     
    ayekaye01, Apr 19, 2011 IP
  7. ayekaye01

    ayekaye01 Peon

    Messages:
    214
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    it's either the top or bottom margin, in your css, its set to auto try to put a figure like 5px or so, trial and error.try it first with the top margin then bottom, dont change the right and left
     
    ayekaye01, Apr 19, 2011 IP
  8. RamCity

    RamCity Peon

    Messages:
    732
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Try timthumb.php. You can find it here-> http://timthumb.googlecode.com/svn/trunk/timthumb.php
     
    RamCity, Apr 19, 2011 IP
  9. FallenShadow

    FallenShadow Active Member

    Messages:
    230
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    90
    #9
    If you want the image to scale itself, you need to set a max-width or max-height in the CSS depending on if the image is wider or taller.. or you could just set them both.
     
    FallenShadow, Apr 19, 2011 IP