dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: Image resizing in div for resolution

  1. #1
    Join Date
    Apr 2012
    Location
    Yreka, California
    Posts
    3

    Question Image resizing in div for resolution

    Hello,

    I need help with an image problem. I have validated my html and css, all is good. When I hold the ctrl key and scroll my mouse the image no longer fits in the div correctly.

    Help Please

    www.siskiyoudistributing.com/product.html

  2. #2
    Join Date
    Aug 2011
    Location
    Canada, ON
    Posts
    10
    It seems like you are using relative values for your dimensions and positioning. You are going to have to change the div (I'm assuming) that has your image to a px value (because that's how images are measured) to constrain the border to the image.

  3. #3
    Join Date
    Apr 2012
    Location
    Yreka, California
    Posts
    3
    If you are saying I should treat it the same as I would my iframes that my flash movies are in, I can do that. I will give it a shot, thanks.

  4. #4
    Join Date
    Apr 2012
    Location
    Yreka, California
    Posts
    3
    Hi,

    Just wanted to say that your suggestion helped me fix the problem. I had put a min-height and min-width in my css. Once I changed it to a definite size the issue was resolved without affecting the rest of the page. Thanks again.

  5. #5
    Join Date
    Aug 2011
    Location
    Canada, ON
    Posts
    10
    that's good.
    If your not worried about constraining the image.

    img {max-height: 100%;
    max-width: 100%;
    width: 100%;
    height: 100%;}

    works. Honestly, had no sure fix without playing with it myself so.... *thumbs up* you got it

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles