Design Prototyping in the Browser Design Patterns Image Carousels

Sean Flanagan
Sean Flanagan
33,224 Points

Carousel won't transition

Hi.

The carousel refuses to transition to the next colour. Is there any reason for this?

https://w.trhou.se/3zpn7fico0

Cheers

Sean

1 Answer

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

It is transitioning, but your carousel backgrounds are all the same color. I added these inline styles to demonstrate:

https://w.trhou.se/262gj9tsf6

Relevant code is here:

      <section id="featured" class="carousel slide" data-ride="carousel">
        <div class="carousel-inner">
          <div class="carousel-item active" style="background:red;">
            <img src="#">
          </div>
          <div class="carousel-item" style="background:blue;">
            <img src="#">
          </div>
          <div class="carousel-item">
            <img src="#">
          </div>
        </div>
      </section>
Sean Flanagan
Sean Flanagan
33,224 Points

Hi Nick.

I copied your code into my index.html and now the transition is working perfectly.

I've upvoted your post and given it Best Answer.

Thank you

Sean