Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Mar 2011
    Location
    Nashville, TN
    Posts
    340
    Member #
    27244
    Liked
    26 times
    Ive got some images that must be X and Y sizes. However when i set the img to X width and Y height it may take a stretched image and distort it a lot which ruins the image. Its late and i cannot remember the correct way in doing it. The help is greatly appreciated. My goal is to resize the image to meet the requested size for images. Such as 100px wide by 80px tall. But if the image is 100px wide and 60px tall it will force it to the 80px. How can i force a size limitation without destroying the image?

    thanks

    plus im trying to figure out how to force all images to center correctly. My code looks like this:

    HTML:
    <div class="realtorlogo"><img class="realtorimg" width="100px" src="images/century_21_logo.jpg" alt="Realtor Logo" /></div>

    CSS:
    .realtorlogo{width:120px; height:100px; float:left; margin:0px 0px 0px 12px; padding:0px;}

    .realtorimg{margin:auto; padding:0px;}


  2.  

  3. #2
    Senior Member
    Join Date
    Mar 2011
    Location
    Nashville, TN
    Posts
    340
    Member #
    27244
    Liked
    26 times
    3 hour sleep bump =)


  4. #3
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    You have to use % as your sizing model, otherwise you will distort images when they are re-sized. Using a % will make sure the images original ratios stay intact.

  5. #4
    Senior Member
    Join Date
    Mar 2011
    Location
    Nashville, TN
    Posts
    340
    Member #
    27244
    Liked
    26 times
    Quote Originally Posted by Webzarus, post: 221423
    You have to use % as your sizing model, otherwise you will distort images when they are re-sized. Using a % will make sure the images original ratios stay intact.
    thanks but that didnt work, it actually was max-width and max-height from what i can tell now.



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:25 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com