Results 1 to 5 of 5

Thread: [RESOLVED] Shrink images after zoom to prevent overflow

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,754

    Resolved [RESOLVED] Shrink images after zoom to prevent overflow

    How am I able to resize images after a user zooms in a page or if the user is using a smaller screen(mobile)? Currently this is my code: http://jsfiddle.net/dday9/k9gbw1gw/
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  2. #2
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Shrink images after zoom to prevent overflow

    Sounds like you want the picture element, currently available only on Chrome/Chromium and Opera, or the srcset attribute on the img element.

    http://www.smashingmagazine.com/2014...icture-srcset/
    http://responsiveimages.org/

    And one more thing, when creating a fiddle (awesome!!), you can replace your normal image references with a placeholder image link to get a placeholder image.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  3. #3

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,754

    Re: Shrink images after zoom to prevent overflow

    Sounds like you want the picture element, currently available only on Chrome/Chromium and Opera, or the srcset attribute on the img element.
    Drats, the majority of my user base will be using IE10(and I hate developing just for IE). For now it's no big deal, it was just a pet peeve of mine that I wanted fixed.

    you can replace your normal image references with a placeholder image link to get a placeholder image.
    That is awesome, I'll be sure to use that in the future.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  4. #4
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: [RESOLVED] Shrink images after zoom to prevent overflow

    Looks like you might be in luck. Some guys have made a polyfill for this.

    http://www.smashingmagazine.com/2014...fect-polyfill/
    https://scottjehl.github.io/picturefill/
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  5. #5

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,754

    Re: [RESOLVED] Shrink images after zoom to prevent overflow

    It's frustrating to go to caniuse.com and see IE really not supporting any of the leading html tags or attributes. Heck, IE doesn't even support <main>, the only major browser that does not use <main> is Opera Mini.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

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



Click Here to Expand Forum to Full Width