valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

carousel - error? #5783

Open andrejm7 opened 4 years ago

andrejm7 commented 4 years ago

image

Hello .. I follow an example of stackblitz but in my project this is the carousel.

because?

andrejm7 commented 4 years ago

https://stackblitz.com/edit/ngx-bootstrap-itemperslide-carousel-example-vpp8dc?file=index.html

in bootstrap 4.5.0...

why?

emanuelegaleotti-quix commented 4 years ago

the problem encountered appears to occur with the latest version of bootstrap. from the link you can see the problem (there is only one slide in the carousel with more slides) if you select an older version of bootstrap the problem disappears

ttong9 commented 4 years ago

@andrejm7 I don't know if you're still facing this issue but I ran into the same problem. After digging around a bit and comparing my project against the demo, I think the problem is from an improper margin: .carousel-item { margin-right: -100% }

I fixed the issue by adding the following to my project css file:

.carousel-item {
    margin-right: 0;
}