Beginner coder here, testing my skills with a self-assigned task.
I've created a carousel using Bootstrap 5 with three slides, each containing two lines of captions. As the slides transition, the captions move in opposite directions—up and down. However, I'm facing a problem: because the caption div is nested within the slide div, the animations cause the captions to move diagonally during the transition, and there's also a gap between the slides.
I've almost fixed it but I'm struggling with separating the caption div from the slide div without causing overlapping issues when new captions appear. Is there a way to prevent interference between the two divs?
You can see the issue in this Codepen: https://codepen.io/AlexanderSplat/pen/YzZvEaM
And here's the same Codepen with the caption divs taken out for reference: https://codepen.io/AlexanderSplat/pen/vYxROqo
I've also included the code snippets below, but they may not work due to a recent Fastly disruption:
Incorrect transitions:
...
Good transitions, but with text overlap:
...