Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    TKO
    TKO is offline
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Resize image keeping apsect ratio with min-height

    Hi all,

    Having some trouble resizing an image. I need the image to have a min-height of 600px, but once it's been resized to 600px height, I need to width to resize too, keeping the aspect ratio of the original image.

    Any help?

  • #2
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    399
    Thanks
    2
    Thanked 30 Times in 30 Posts
    Set min-width to the value required to maintain the aspect ratio. generally the way to maintain aspect ration is to set the width as the height is dynamic and will set correctly as long as it is not restricted with and explicit declaration.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •