Question:
I’m trying to use bootstrap carousel inside CSS flexbox. My issue is that I made some mistakes in the HTML and the second slide of the carousel doesn’t show up. I can use the next button to move from the first slide, but it doesn’t display the second and stays blank.Here’s my code:
Thanks in advance <3
Answer:
Yourcarousel-item
weren’t nested correctly, so when the buttons were triggering the active
class change it was applying it to an element that was nested in an element that was no longer visible. When you do these, make sure you check to ensure that your items are inside the carousel-inner
or the primary carousel container in whatever framework you use and not inside of each other as you had them initially. If you watch it in the browser inspector, you can see the class change when you use the nav arrows
If you have better answer, please add a comment about this, thank you!