Giter Site home page Giter Site logo

Comments (7)

Andynopol avatar Andynopol commented on May 16, 2024 3

But how can I set the size of the whole slider?

If the property "sizes" is the answer, I would like to see an example of how to use this property. I have made some tries(like sizes={width:'100px'} or sizes={{width:'100px'}}) but no success so far.

from react-image-gallery.

xiaolin avatar xiaolin commented on May 16, 2024 2

you can override the css for the width of the images e.g.

.image-gallery-slide img {
  width: 400px;
}

from react-image-gallery.

xiaolin avatar xiaolin commented on May 16, 2024

I'm not sure what you mean by this. Can you give an example?

from react-image-gallery.

vinhtq avatar vinhtq commented on May 16, 2024

I have image size: 400x300
But the gallery auto adjust the size to 266x200 like the image here: http://imgur.com/crUoaDi

I check but there is not option for setting the width, height for the gallery. So how can I set the dimension for the gallery

from react-image-gallery.

vinhtq avatar vinhtq commented on May 16, 2024

It works, thank you!

from react-image-gallery.

ndricimrr avatar ndricimrr commented on May 16, 2024

@Andynopol I had a similiar question, Something like this solved it for me:

.image-gallery {
    width: 400px;
}

As for how to use the sizes property I had a similar intuition but it doesn't seem to work like that. As specified in the docs here you also need to specify srcset alongside sizes :

If the srcset attribute is absent, or contains no values with a width descriptor, then the sizes attribute has no effect.

If it helps you may find an explained example on how to use it here

from react-image-gallery.

m3c-ode avatar m3c-ode commented on May 16, 2024

Hi there!

I also wanted to control the size of the gallery, because it changed on every single picture... Is that the only way to control this?
The problem with this control is that, when I toggle the fullscreen mode, this height I defined

.image-gallery-slide img {
  height: 500px;
}

is still applicable. And I would like it to be full screen.

What would be a suggestion?

from react-image-gallery.

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.