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

Carousel #29

Closed
AlexJMcloud opened this issue Jul 19, 2021 · 4 comments
Closed

Carousel #29

AlexJMcloud opened this issue Jul 19, 2021 · 4 comments

Comments

@AlexJMcloud
Copy link

Installed the carousel. Scrolls with a large white space. Something went wrong???
2
1
myCarousel = new Carousel(document.querySelector("#carousel"),{slides: slide,'dragFree':true});

@fancyapps
Copy link
Owner

Hi,

Please, provide additional info, a live demo would help to give a proper answer. You can easily create a demo here - https://fancyapps.com/playground/ - buy you can use any other similar service (Codepen/Codesandbox/etc).

Basically, you control the width of the slide using CSS. For example, in this demo - https://fancyapps.com/playground/g9 - each slide has a width of 30%. Images are large enough to fill the slide and they have a maximum width of 100%, so that they are responsive.

@AlexJMcloud
Copy link
Author

Hi,

Please, provide additional info, a live demo would help to give a proper answer. You can easily create a demo here - https://fancyapps.com/playground/ - buy you can use any other similar service (Codepen/Codesandbox/etc).

Basically, you control the width of the slide using CSS. For example, in this demo - https://fancyapps.com/playground/g9 - each slide has a width of 30%. Images are large enough to fill the slide and they have a maximum width of 100%, so that they are responsive.

Thanks for the example. I have corrected my code and there are no such failures. I think this example should be placed in the documentation. It will be useful to many.

@AlexJMcloud
Copy link
Author

It only remains to understand how to align the photo horizontally. They are different in height.

@fancyapps
Copy link
Owner

fancyapps commented Jul 19, 2021

Since slides are flex items, you can easily align content as you need. Also, all slides will be the same height, except for virtual slides.

btw, if you wonder how to combine everything, here is a quick demo - https://fancyapps.com/playground/pL

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

2 participants