Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pictures don't appear properly when sliding #92

Open
maianabertola opened this issue Aug 7, 2023 · 0 comments
Open

Pictures don't appear properly when sliding #92

maianabertola opened this issue Aug 7, 2023 · 0 comments

Comments

@maianabertola
Copy link

Hello yifaneye!

First, thank you for this very useful carousel! However, I am experiencing a little problem with the image display.

The issue
The first image seems to appear correctly. But as soon as I slide to the next ones, everything seems to shift slowly to the right. As a result, I have two photos appearing on one slide.

Expected behavior
How do I make one photo appear properly per slide?

Specifications

  • My photos are all different sizes.
  • They are fetched from a database that I created.
  • I wrapped the carousel in a wrapper to position it in the center of my page.
  • Browser: Chrome
  • I'm new to coding! I've read the documentation and tried to find information on StackOverflow and ChatGPT but haven't found anything 😅

Screenshots
I made a loom record of the carrousel

<>
      <div className="pageContainer">
        <div className="titleWrapper">
          <h1>
            {villa.Villa.name} — {villa.Villa.region}
          </h1>
          <div>
            <Link to={-1}>Back</Link>
          </div>
        </div>

        <div className="flexRow">
          <Carousel
            images={images}
            style={{ height: 500, width: 600 }}
            hasMediaButton={false}
            shouldLazyLoad={true}
            objectFit="contain"
          ></Carousel>
        </div>
      </div>
    </>
  );
}
.titleWrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-bottom: 4vh;
  margin-left: 4.5vw;
  margin-right: 4.5vw;
  align-items: flex-end;
}

.titleWrapper > h1 {
  margin: 0;
  padding: 0;
}

I hope this helps. I'm looking forward to your response. Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant