SSENSE/vue-carousel

Question: How can I have two carousels on one page?

Open

#123 opened on Feb 1, 2018

View on GitHub
 (11 comments) (0 reactions) (0 assignees)JavaScript (513 forks)batch import
help wantedquestion

Repository metrics

Stars
 (1,705 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I have two Vue-Carousel components,

  1. A 'Portfolio' images component with arrows left & right.
  2. And a 'Quotes' component that shows quotes I like.

I can get the Portfolio images component working correctly no problem, but the Quotes component is massively wide. It appears to be some weird css flexbox issue. The flex-basis is way too wide: "flex-basis: 2932px". <div class="VueCarousel-inner" style="transform: translateX(0px); transition: transform 0.5s ease; flex-basis: 2932px; visibility: visible;">

On my Portfolio component, which is good, I have: <slide><img src="x.png"></slide>

And then:

img {
      width: 100% !important;
      height: auto !important;
      background-size: cover !important;
    }

So I am at a loss... I'm a bit of a noob but it seems like the JS is not calculating the math correctly?? No idea really. Please help.

*Using latest versions of everything.

Contributor guide