Giter Site home page Giter Site logo

Comments (7)

davcpas1234 avatar davcpas1234 commented on September 26, 2024 7

For anyone having this issue more recently, this is now implemented like so: <img data-src="holder.js/100px100?auto">.

from holder.

imsky avatar imsky commented on September 26, 2024

Have you tried percentage widths for both dimensions? Something like <div style="width:500px;height:200px"><img data-src="holder.js/100%x100%"></div>

from holder.

Fatbat avatar Fatbat commented on September 26, 2024

Too many unnecessary divs that way for my liking. Normally a responsive image only needs to be declared with:

max-width: 100%;
height: auto;

To fill the width of it's parent container automatically, assuming the image is wide enough, while the height works itself out. I'd rather not have to wrap each image in an extra div to accomplish the same thing.

from holder.

imsky avatar imsky commented on September 26, 2024

This is now implemented, using the auto flag on a fluid image, like so: <img data-src="holder.js/100%x100/auto">

from holder.

Fatbat avatar Fatbat commented on September 26, 2024

Edit: sorry, misread the post. Downloaded the new version and it's great, thank you very much!

from holder.

imsky avatar imsky commented on September 26, 2024

Have you downloaded the latest file?

On Oct 22, 2013, at 4:43 PM, Brad Shaw [email protected] wrote:

I tried that, but it doesn't work. Height stays at whatever you set it to. In your example above the height stays pegged at 100px while the width adapts to the container width.


Reply to this email directly or view it on GitHub.

from holder.

Fatbat avatar Fatbat commented on September 26, 2024

Yep, got it and it's working great. Thank you very much!

from holder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.